Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Nested Transaction
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00090423
Message ID:
00090429
Vues:
27
>I use a grid for the detail of an order entry form, I added methods to the grid rather than the form because the same grid is used on several forms. One method, I call DeleteOne, deletes the current record of the recordsource of the grid. I begin a transaction,make updates to three other tables effected by the delete, and if all is successfull, delete the record, if not ROLLBACK.
>
>Now I want to add a method that deletes all records in the grid which is detail for a single order. Call it DeleteAll and I want to begin a transaction, start at first record and call DeleteOne ( remeber this method uses BEGIN TRANS and END TRANS in itself ) and move through the detail records calling DeleteOne on each record. If for some reason one record can not be deleted and I issue ROLLBACK in DeleteAll method, will the tables updated when END TRANS was issued on each record in DeleteOne be rolled back also ?

if coded correctly, yes.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform