Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fixing Doug Henning update conflict dedection logic
Message
De
11/10/2001 16:07:03
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Fixing Doug Henning update conflict dedection logic
Divers
Thread ID:
00567205
Message ID:
00567205
Vues:
57
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform