Yes, as written this use of CFTRANSACTION is purpose-free.  But if the
developer wants to roll back the transaction if the structupdate fails, I
think CFTRY/CFCATCH and CFTRANSACTION type="rollback" could be useful.

-----Original Message-----
From: Aidan Whitehall [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 17, 2001 11:08 AM
To: CF-Talk
Subject: CFTRANSACTION


There's this code in an application...


<CFTRANSACTION>

   <CFX_Something...>

   <CFQUERY...>
      INSERT INTO...
   </CFQUERY>

   <CFSCRIPT>
      StructUpdate(..., ..., ...);
   </CFSCRIPT>

</CFTRANSACTION>


Is there any point in having the CFTRANSACTION? I thought CFTRANSACTION only
affected database queries.

If the CFX failed, it wouldn't get to the CFQUERY. And if the CFSCRIPT
failed, it would have already done the INSERT anyway, even with the
CFTRANSACTION... yes?



Thanks

-- 
Aidan Whitehall <[EMAIL PROTECTED]>
Netshopperuk
Telephone +44 (01744) 648650
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to