Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Curval only works after Refresh - despite error
Message
From
20/12/2004 10:17:16
 
 
To
20/12/2004 07:30:52
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
00970554
Message ID:
00970624
Views:
20
This message has been marked as a message which has helped to the initial question of the thread.
>No explicit buffering is used at all. The tests are on plain VFP tables.
>
>>>Using native VFP tables, I have been attempting to check if another network user has changed a record whilst the present user has been editing (no buffering involved).
>>>
>>>CURVAL() does not return the value from disk, but uses a cached value. SET REFRESH seems to make no difference to anything.
>>>
>>>If I issue REFRESH(), despite an error (no update tables specified), CURVAL() does correctly return the disk value.
>>>
>>>Is there an official way to achieve this, or must I use REFRESH(), supressing the error?
>>
>>
>>What is it the Workarea buffering set ?
>>
>>Fabio

Premised that, one corrected definition of CURVAL() does not have to depend on buffering (the same one for REFRESH()).

Even if it is strange that with a native table CURVAL() functions with buffering = 1, I can confirm this fact.

Well, CURVAL() don't read from the filesystem,
but from the VFP's inner cache ( SYS(1103) report it's size ), or uses the workarea buffer where VFP store OLDVAL().

Then:
try:
GO RECNO() IN Alias
or
SYS(1104) && clear inner cache
* SYS(1104,Alias) && in VFP9 clear inner cache for the fileHandle(Alias)
Of course, REFRESH() it is the better solution,
but the Team has put of the code that controls the buffering and generates a error
(a incorrect definition for REFRESH()).

Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform