At 04:53 PM 1/9/2003, you wrote: >Yeah, that's actually what I am doing, if the first fails, no need to >do the second one at all. The problem lies in that when the second query >fails, I need to roll back the first. > >-- > jon > mailto:[EMAIL PROTECTED]
There are a couple of ways to do this, but you seemed to want a quick solution where you didn't have to change your code at all. No help there, but if you're willing to change your code: 1. Use DB level transactions. Haven't done it with CF, but you should be able to just put begin trans; commit; rollback inside a cfquery. 2. You might e able to use cfschedule to immediately run off another CFM page asynchronously, or more correctly, run off two pages. They each start their own transaction, and they both set some flag to indicate when they're done and the status. If both indicate ok, they both commit. Otherwise, they both rollback. If you need to run it synchronously, you can block the original code until the others indicate completion. Just keep in mind you're now taking up three threads to run one request, so you'll have to increase the number of simultaneous threads. 3. Put this whole block of code into something else, like Java or VB where you can do separate simultaneous transactions. Good luck. Sam ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

