Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding memo data problems in multiple private data sessi
Message
 
À
29/08/1998 06:10:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00131241
Message ID:
00131246
Vues:
18
James,

Don't begin the transaction inthe add and edit buttons. Transactions are designed to group a number of tableupdates into one all or none operation. The transaction locks resources for everything that occurs during the transaction.

The right way to use transaction is to turn on data bufferreing either using CursorProp() or by setting the BufferMode Overide property for each cursor in the data environment. Then when the user starts an add or an edit you just let them. When they say save, you;
LOCAL llRollback
BEGIN TRANSACTION

IF TableUpdate(0,.F.,"Table1)
   IF TableUpdate(0,.F.,"Table2")
   ELSE
      llRollback = .T.
ELSE
   llRollback = .T.
ENDIF

IF llRollback
   ROLLBACK
ELSE
   ENDTRANSACTION
ENDIF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform