Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More about table updates
Message
 
To
20/07/2001 19:03:40
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00533368
Message ID:
00533568
Views:
14
This message has been marked as a message which has helped to the initial question of the thread.
> I suppose to prevent users from actually having
> to redo their orders or whatnot, it would have
> to be stored in some manner before the transaction,
> so that it it fails, there is a mechanism to retry
> until it succeeds?
You probably won't need to do this.

When you do a ROLLBACK, VFP makes sures that none of the changes is actually commited to the database (even though you already sent a TableUpdate.)

The ROLLBACK will not do a TableRevert in your view, and thus, after the ROLLBACK you will still have the data that the users inputed to your views/tables.

Let's say that the original value in a field was "abc", then your user modified to "xyz".
? myview.myfield && returns 'xyz'
begin transaction
     TableUpdate( 2, .F., 'myview' )
rollback
? myview.myfield && still returns 'xyz', not 'abc'
Hector Correa
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform