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\Microsoft
\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:185179
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to