Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wrapping all SQL updates into one transaction
Message
From
11/01/2000 09:10:35
 
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00315804
Message ID:
00316126
Views:
22
Thank you for your reply.

Well, your recommendation seems straight-forward enough; however, I'm not quite sure how to apply it to my situation though. Maybe you need to hold my hand and walk me through it step-by-step.

My problem is that the one module I was describing earlier also calls other VFP modules which perform similar updates to multiple tables. For example, I have one module where I read in a data file in ASCII text format with at least 5 different file segments. Each segment might update multiple tables on the back-end server depending on its contents. I also have one module to process each file segment, and in each module I have multiple SQL updates and/or inserts depending on the data I'm reading in (as compared to the existing back-end data). As you can see, there are too many data processing, comparision, and updates at different segment levels. I need a mean to undo all changes perform by all modules if anything was to happen (i.e., system hang up, error, etc...).

Is there a simplier and more effective way to rollback all changes to previous updates (i.e., segment 1,2,3 or 4 updates) if something was to cause an error or hang up in the last file segment processing? And, maybe I don't know how to implement SQLROLLBACK() properly, but doesn't it only rollback changes so far?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform