Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data buffering not working
Message
 
 
À
21/06/2001 13:35:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00521900
Message ID:
00522053
Vues:
16
Hi!

Thanks for fixing me.
I guess you can try to use a view and refresh() for it before saving. Refresh for current record in view do not affect changed values, however, it updates the values returned by CurVal(). Anyway, you cn try this and see of this fix the OldVal returning.
Finally, for new records OldVal() will return NULL. If you check for Field<>oldval(field), it is incorrect because if Oldval() returns null, the comparison will be .F. (means equal that is not correct). Check if you did nto missed the issue with NULL returned by OldVal().

HTH.

>Vlad,
>
>CurVal() shows what the value is on the disk (and might have been changed by someone else) and OldVal() shows what the value was the last time we loaded from disk (what we might have changed).
>
>I use GetFldState(-1) in my SaveRecord audit method were I am going to record the fields that changed. However it does require you extra programming to find if the one field we are interested in was changed. OldVal() starts with only the interesting field.
>
>My further investigations show that if I force a tablerevert the field goes back to the old value. In otherwords the data buffering is working. OldVal() is not. I will see what GetFldState() reports.
>
>Thank You - I will get back to you.
>
>>Hi!
>>
>>I usually use the GetFldState() function to check if some field is changed by user. OldVal() is used only for updating process if you want to see what values are changed by other users the values if tableupdate(.F.,...) failed (by comparing NewVal() with OldVal()).
>>
>>HTH.
>>
>>>I have started a new form using my base form class which I have used for over 50 forms.
>>>
>>>The Base form class uses data buffering. It contains a "Changed" method
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform