Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding memo data problems in multiple private data sessi
Message
 
To
29/08/1998 06:10:35
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00131241
Message ID:
00131246
Views:
19
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
Previous
Reply
Map
View

Click here to load this message in the networking platform