Information générale
Catégorie:
Codage, syntaxe et commandes
>>Hello everyone:
>>
>> I programe a multi user programe,have set a form datasession be private, and use the form to test the programe,and I also
>>set multilock on
>>=cursorsetprop('buffering',5,'viewname')
>>But why the curval() and oldval() always return the same value?
>
>They should have the same value, unless another user made changes in the meantime.
>
>
MyField = Current value of field "Myfield". Includes the changes the user has just done.
>oldval("MyField") = Values of MyField before the user made changes.
>curval("MyField") = Value of MyField on disk. Visual FoxPro will read the field from disk again.
>
>Before you do a TableUpdate(), the value on disk is not changed.
>
>But if another user makes changes, you may get a different value.
>
>HTH,
>
>Hilmar.
Except that if you are using views, then the data for curval() is read from the buffer. That means that if another user has made a change, it might not be reflected in curval().
Alan
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement