> This is how I deal with it:
> 
> <cftransaction action="BEGIN">
> 
>       <cfquery name="qry_addcontact" datasource="#DSN#">
>               INSERT INTO Contact( the fields... )
>                       VALUES ( the values... )
>       </cfquery>
>                                       
>       <cfquery name="qry_getnewid" datasource="#DSN#">
>               SELECT  MAX(ID) AS TheID
>               FROM    ContactInfo
>       </cfquery>
>       
>       <cfquery name="qry_addcontactinfo" datasource="#DSN#">
>               INSERT INTO ContactInfo ( ContactID, the fields... )
>                       VALUES (#qry_getnewid.TheID#, the values..)
>       </cfquery>
>       
> 
>               <cftransaction action="COMMIT"/>
> </cftransaction>

There's no need for the nested CFTRANSACTION tag in there. The outer
CFTRANSACTION block will commit or rollback changes by itself. You'd only
specify an action of COMMIT if you wanted to do a partial commit within a
larger transaction.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to