> 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-
> circuit the rest of the transaction, or does processing stop
> automatically?
You're doing more work than necessary, I think.
One of the purposes of using CFTRANSACTION in the first place is to roll
back any changes made if part of the transaction fails. You don't need the
CFTRY/CFCATCH in there - if you have a database error, the CFTRANSACTION
will roll back everything, then fail. You also don't need an explicit
ACTION="ROLLBACK" in there, unless you want to do a partial rollback, then
continue processing queries within the transaction.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: (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