Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update multiple tables
Message
 
To
27/01/1999 09:20:22
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00180719
Message ID:
00180770
Views:
14
Bernard,

Use a transaction as in;
LOCAL llRollBack
BEGIN TRANSACTION

  IF TableUpdate(2,.F.,"FirstTable")
      IF TableUpdate(2,.F.,"SecondTable")
         IF TableUpdate(2,.F.,"ThirdTable")
         ELSE
            llRollBack = .T.
         ENDIF
      ELSE
         llRollBack = .T.
      ENDIF
   ELSE
     llRollBack = .T.
   ENDIF
      
   IF llRollBack
      ROLLBACK
      TableRevert(.T.,"FirstTable")
      TableRevert(.T.,"SecondTable")
      TableRevert(.T.,"ThirdTable")
   ELSE
      END TRANSACTION
   ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform