Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP5: Traping/Fixing Update conflicts in local view
Message
De
06/11/1997 11:57:07
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
VFP5: Traping/Fixing Update conflicts in local view
Divers
Thread ID:
00058625
Message ID:
00058625
Vues:
79
I'm having a problem with the following code in an error method of a grid. The data source is a local view. I've tried it with both no buffering and optimistic row buffering - the results appear to be the same.

The desired behavior is 1) Detect the error, 2) Advise the user of the conflict, 3) update the data in the grid to reflect the data on disk, 4) allow user to view the updated data and if they so desire to make and save changes.

do case
case nError = 1585 && Update conflict
= messagebox(<snip> - notify user of conflict)
=tablerevert()
requery()
nodefault
endcase

I'm testing by having two VFP sessions open on my Win '95 machine. I have both sessions running the same form.

In Session A I'll make a change and move the record pointer. Change saved.

In Session B I'll make a change to the same record as in A and attempt to move the record pointer

In Session B, the error code fires, the grid is refreshed to display the data Session A changed.

In Session B, I'll again try to change the data., but the Error Code fires again!

Any ideas why I'm getting a data conflict after I've just requeried? It doesn't make sense to me.

Andrew
Andrew Dewey
Répondre
Fil
Voir

Click here to load this message in the networking platform