Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update multiple tables
Message
 
À
27/01/1999 09:20:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00180719
Message ID:
00180770
Vues:
13
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform