Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Buffering
Message
 
To
30/09/1999 13:15:29
Srinivasan Ashwath
Zeus Software Services
Hyderabad, India
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00270717
Message ID:
00271234
Views:
25
Ashwath,

Don't do Inserts, updates, and deletes inside a transaction.

Tunr of buffering and do all the inserts, updates, and deletes you need. When they are all done, then;
LOCAL llRollBack

BEGIN TRANSACTION
   
IF NOT llRollBack AND NOT TableUpdate(1,.F.,"Customer")
   llRollBack = .T.
ENDIF
IF NOT llRollBack AND NOT TableUpdate(1,.F.,"Invoice")
   llRollBack = .T.
ENDIF
IF NOT llRollBack AND NOT TableUpdate(1,.F.,"InvLines")
   llRollBack = .T.
ENDIF

IF llRollBack
   ROLLBACK
   * and if you want to
   TableRevert(.t.,"Customer")
   TableRevert(.t.,"Invoice")
   TableRevert(.t.,"InvLines")
ELSE
   END TRANSACTION
ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform