Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More about table updates
Message
 
À
20/07/2001 19:03:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00533368
Message ID:
00533568
Vues:
13
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform