Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rolling back input done via insert into and replace cmds
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00777224
Message ID:
00777348
Vues:
13
>You need to enclose all of the transactions between a begin and end transaction structure. If
>no errors occur, you'll issue the END TRANSACTION, otherwise, you'll issue the ROLLBACK.
>
>However, your tables MUST be included in a DBC, and I imagine they'll need to be buffered. The
>reason I sound a little vague on the buffering is that I only use buffered sql views myself. I
>don't do any direct writing to tables.

Yes, you must use buffered tables for this. However, the data changes don't need to be wrapped in the BEGIN/END TRANSACTION: only the actual TableUpdate() calls. Here's some pseudocode:
USE myTable
CURSORSETPROP("Buffering", 5)
REPLACE myField WITH myValue
BEGIN TRANSACTION
IF TABLEUPDATE()
   END TRANSACTION
ELSE
   ROLLBACK
   TABLEREVERT()
ENDIF
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform