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