Well, I am not sure that is true...if you have 3 blocks of SQL : an insert, and update and a delete in a transaction like below and the delete fails then the system will not rollback your first two blocks...you will have to explicitly determine that as a developer and make the call.
-----Original Message----- From: Pascal Peters [mailto:[EMAIL PROTECTED] Sent: 23 November 2004 16:29 To: CF-Talk Subject: RE: Is this <cftransaction> going to work? No, by default it will rollback if one fails > -----Original Message----- > From: gabriel l smallman [mailto:[EMAIL PROTECTED] > Sent: 23 November 2004 17:25 > To: CF-Talk > Subject: RE: Is this <cftransaction> going to work? > > I think you have to explictly state a rollback, by default the transaction > tag only does locking I think. > > <cftransaction action="ROLLBACK"> > > -----Original Message----- > From: Ian Skinner [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 23, 2004 11:18 AM > To: CF-Talk > Subject: Is this <cftransaction> going to work? > > If I have a block of code that is going to call several queries, and I > have > placed the queries into functions of a CFC, can I wrap these calls into a > single transaction? > > Basically I will have something like this. > > <!--- Update several related tables ---> <cftransaction> > <cfinvoke component="#dataObj#" method="updateTable1" ....> > > <cfinvoke component="#dataObj#" method="deleteTable2" ...> > > <cfloop from="1" to="#something# index="i"> > <cfif this EQ that> > <cfinvoke component="#dataObj#" > method="insertTable2" ...> > <cfelse> > <cfinvoke component="#dataObj#" > method="updateTable2" ...> > </cfif> > </cfloop> > </cftransaction> > > Will the <cftransaction> work here allowing all these queries to be rolled > back if any where to fail? > -------------- > Ian Skinner > Web Programmer > BloodSource > <file:///C:\Documents%20and%20Settings\iskinner\Application%20Data\Micro so > ft > \Signatures\www.BloodSource.org> www.BloodSource.org > <http://www.BloodSource.orgSacramento> > Sacramento, CA > > "C code. C code run. Run code run. Please!" > - Cynthia Dunning > > > Confidentiality Notice: This message including any attachments is for the > sole use of the intended > recipient(s) and may contain confidential and privileged information. Any > unauthorized review, use, disclosure or distribution is prohibited. If you > are not the intended recipient, please contact the sender and delete any > copies of this message. > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185191 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

