Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Nested Transaction
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Nested Transaction
Miscellaneous
Thread ID:
00090423
Message ID:
00090423
Views:
55
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 ?
Next
Reply
Map
View

Click here to load this message in the networking platform