[thelist] ColdFusion CFTRANSACTION

Bruce Heerssen bheerssen at visualbridge.tv
Mon Jun 25 10:38:25 CDT 2001


jon steele wrote:

>Is this correct usage of CFTRANSACTION? I get a "Last tag in cftry must
>be cfcatch", but in the documentation, in the example, the last tag
>their is cftransaction...so I'm confused. Also, do I need any
><cftransaction action="commit"> tags? What I basically need is either
>all pages are run with no errors or none are run.
>
The docs may be in error. It has happened before. The actual error 
messages you get are almost always accurate, however.

Try this:

<transaction>
<cftry>
<cfinclude template="(your file)">
<cfcatch type="database">
<cftransaction action="rollback" />
</cfcatch>
</cftry>
</cftransaction>

HTH,
Bruce





More information about the thelist mailing list