>Figured someone would know and answer quicker than me testing this.
>
>Can you wrap a query with cftry inside a cftransaction?
>
>Thanks,
>Will
I do this all the time in my CFCs...
<cftransaction>
<cftry>
<cfquery>
<!--- Query here --->
</cfquery>
<cfquery>
<!--- Another query here --->
</cfquery>
<cfcatch type="database">
<cftransaction action="rollback" />
<cfreturn false />
</cfcatch>
<!--- If no database errors caught, commit transaction --->
<cftransaction action="commit" />
</cftransaction>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259422
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4