Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting records using SQL Delete in Grids
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00538999
Message ID:
00539949
Vues:
11
>It's overkill to pack a table after every delete.
SET DELETE ON
will make deleted records invisible. The following code would delete the current record in the table and refresh grid
*DELETE BUTTON - CLICK EVENT
>SELECT rev_locations
>DELETE
><b>This.Parent.Grid1.Refresh()</b>
>
You should move off this record in order to this record disappear, e.g. go recno() before refresh().

>
>>Sergey:
>>
>>I put in the code you suggested in the Delete button. The result was the the grid did not refresh to show that the deleted record was gone. I then put the statement PACK after your code, then I got a message saying file must be opened exclusively. After deletion, I want the grid to refresh to show the remaining contents of the table.
>>
>>I probably am missing something else. In the code I gave you, all I did was took out the SQL Delete statement and replaced that with your code.
>>
>>Thanks.
>>
>>- Ravi
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform