> > > Ok, I've got a <cftransaction> construct such as the pseudo
> > > code below.
> > >
> > > <cftransaction action="begin">
> > >
> > >   ...
> > >
> > >   <cfif Success>
> > >           <cftransaction action="commit"/>
> > >   <cfelse>
> > >           <cftransaction action="rollback"/>
> > >   </cfif>
> > > </cftransaction>
> >
> > Out of curiosity, why do you have the nested commit and 
> > rollback tags? If you're determining the success of the 
> > transaction based on the success of the queries it contains, 
> > you can omit the nested CFTRANSACTION tags.
>
> I thought that in earlier posts you recommended the following 
> construct:
> 
> <cftry>
>       <cftransaction>
>               <cfquery ...>
>               <cfquery ...>
>               <cfquery ...>
>       </cftransaction>
>       <cfcatch>
> </cftry>
> 
> I thought that you didn't need to explicitly perform 
> commit/rollback. Is this correct?

Yes, I'm sure I did recommend that, and you don't need to explicitly perform
commit or rollback unless you want to make your transaction dependent on
some factor other than the success or failure of your database queries.

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

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Reply via email to