Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Values before editing and after saving
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01286843
Message ID:
01286856
Vues:
21
>I do use classes. I have a SAVEIT() method that is called when the SAVE button is clicked.
>
>I do not have abeforesave() or aftersave() method. It is local FoxPro tables.
>
You may change your SaveIT() method to be
thisform.PreSaveHook()
your code
thisform.PostSaveHook()
Add these two stub methods to your base form class.

In the PreSaveHook
thisform.AddProperty('oRecBeforeSave')
scatter name thisform.oRecBeforeSave memo
Oops, would not work <g> You need to save record before started editting.

Anyway, these methods would be helpful.
*in the PostSaveHook

scatter name loCurrRecord memo

if not compobj(loCurrRecord, thisform.oRecBeforeSave)
  * analyze the changes and update your memo - would be one extra tableupdate, though
endif
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform