Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cancel edits
Message
De
25/04/2000 15:47:45
 
 
À
25/04/2000 15:35:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00363305
Message ID:
00363312
Vues:
12
>I have a form that allows editing of records. I want to be able to cancel the edits or save them. My cancel isn't working properly. I click on my edit button and it allows the user to edit the record. The user can then hit the save or cancel buttons. If the user hits cancel I want all the changes made not to show up but they do. How can I fix this? Here is my code for the edit, and cancel buttons.
>
>When user clicks on edit.
>
>m.isediting2 = .T.
>*return to the record when cancelling
>prevrec = recno()
>
>
>When user hits cancel
>
>*go back to the record before edits were made
>go prevrec
>thisformset.refresh
>
>This isn't working and the edits are being stored in the table temporarily. The edits aren't saved but they stay in the table till I exit the application and run it again. What can I do to cancel the edits?
>
>Thanks,
>Tyler

One approach is to use buffering and then TABLEUPDATE() / TABLEREVERT() as necessary. Look in the VFP help; also there are articles here on the UT that address this topic.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform