Umm, according to the Allaire Docs, you can use one or more CFCATCH tags
inside a CFTRY tag. I have done this already. However, the last tag in the
CFTRY tag MUST be a CFCATCH.

-----Original Message-----
From: Martin Laine [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 10, 2001 11:04 AM
To: CF-Talk
Subject: RE: CFTRY/CFCATCH question


First, you can't put CFCATCH tags in the middle of a CFTRY. I has to be the
last tag in the CFTRY.

I would do need to do this:

<cfset dataproblem=0>

<cftransaction action="BEGIN">

        <cftry>
        
                ... queries ...

                <cfcatch type="database">
                        <cftransaction action="ROLLBACK"/>
                        <cfset dataproblem=1>
                </cfcatch>

        </cftry>

        <cfif dataproblem EQ 0>
                <cftransaction action="COMMIT"/>
        </cfif>

</cftransaction>

Hope this helps

-----Original Message-----
From: Saidi; Marwan [mailto:[EMAIL PROTECTED]]
Sent: 10 August 2001 15:55
To: CF-Talk
Subject: CFTRY/CFCATCH question


I have a template with a multi-part update (several tables). I have the
entire process wrapped in <cftransaction> and <cftry>. After each individual
update, I have a <cfcatch>. My question is if something fails, and I
<cftransaction action=rollback />, do I need to short-circut the rest of the
transaction, or does processing stop automatically?



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to