Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why curval() and oldval() return same value?
Message
From
03/11/2003 13:52:31
 
 
To
03/11/2003 12:41:10
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00845548
Message ID:
00845737
Views:
18
>>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
  • Previous
    Reply
    Map
    View

    Click here to load this message in the networking platform