Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fixing Doug Henning update conflict dedection logic
Message
From
11/10/2001 16:07:03
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Fixing Doug Henning update conflict dedection logic
Miscellaneous
Thread ID:
00567205
Message ID:
00567205
Views:
55
I try to use an update conflict logic as described in

Multi-user and Data Buffering Issues (20K) at

www.stonefield.com/pub/buffer.zip

This article recommends to use oldval() and curval() do dedect data changes.
However, in case of field overflow, this code wrongly reports that data
is changed.
In the following sample code, both llOtherUser and llThisUser fields are .T.
How to fix Doug's code ?
Why an VFP error does not occur in this code ? Is this a VFP bug?
close all
set multilocks on
create table test ( test n(1) )
* Why an error does not occur on next line ?
insert into test values (10)
use in test
use test
cursorsetprop( 'buffering', 5 )
lcField      = field(1)
llOtherUser  = oldval(lcField)   <> curval(lcField)
llThisUser   = evaluate(lcField) <> oldval(lcField)
* Why llOtherUser and llThisUser are both .T. ?
Andrus
Next
Reply
Map
View

Click here to load this message in the networking platform