Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT - SQL and buffered table
Message
 
 
To
10/01/2001 10:47:18
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00461621
Message ID:
00462366
Views:
13
>Hi,
> Hmm, NO.... it is not..
> Because I use table buffering to detect conflict for the selected record. (using OLDVAL() and CURVAL()) And I thought that, if I use view again, then it may redone the same thing! Even thought update view will be failed if conflict happened, how could I use view to detect which fields were changed and the CURVAL and OLDVAL??
>
>Thank you

John,
If you truly do not care what other users input into the other three fields, you can use a combination of GetNextModified(), Curval(), Replace and TableUpdate() to bypass this. Try:
local lxx
lxx = getnextmodifed(0)
do while lxx > 0
   go lxx
   replace field1 with curval('field1'), field2 with curval('field2'), field3 with curval('field3')
   lxx = getnextmodifed(lxx)
enddo
tableupdate(.T.,.T.)
This way the current user will change their data to the current data from the disk. They will then update the underlying table using that data. The second parameter tells tableupdate to force the update even if the data has changed (which we already know), but we are changing to the new value anyway.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform