No what your looking for is this:

<CFTRANSACTION ACTION="BEGIN">
<CFTRY>
<!--- All your insert queries here --->
<CFCATCH TYPE="Database">
<CFTRANSACTION ACTION="ROLLBACK"/>
</CFCATCH>
<CFCATCH TYPE="Any">
<CFTRANSACTION ACTION="ROLLBACK"/>
</CFCATCH>
</CFTRY>
</CFTRANSACTION>

Sincerely,
Mike Lakes

[EMAIL PROTECTED]
http://www.snazzydev.com -- Coding for the future.

Date: Tue, 16 Jan 2001 15:08:39 -0500
From: "Marius Milosav" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: CFTRANSACTION - proper usage
Message-ID: <022901c07ff8$1e334f70$[EMAIL PROTECTED]>

<cftransaction>
    <cfquery name="insert1" datasource="#dsn#">
        sql statement1
    </cfquery>
    <cfquery name="insert2" datasource="#dsn#">
        sql statement2
    </cfquery>

    <cfquery name="insert3" datasource="#dsn#">
        sql statement3
    </cfquery>
</cftransaction>

Marius Milosav
www.scorpiosoft.com
It's not about technology, it's about people.
Virtual Help Desk Demo (VHD)
www.scorpiosoft.com/vhd/login.cfm

----- Original Message -----
From: "Bosky, Dave" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, January 16, 2001 2:08 PM
Subject: CFTRANSACTION - proper usage


>I have three queries that insert information, I need to be sure
>that all three inserts take place, if not they are discarded.
>How would I use cftransaction to accomplish this task?
>
>Thanks,
>Dave
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to