I saw several different examples cftransactionand read different sites and still have not been able to find a definitive answer to which parts are cftransactionneeded. What I'm trying to accomplish is very simple:
- start a transaction
- run multiple attachments / updates
- close transaction
If there is an error during insertions / updates, I want to cancel the transaction. Here is what I have done in the past:
<cftransaction>
<cftry>
<cfcatch type="any">
<cftransaction action="rollback">
</cfcatch>
</cftry>
<cftransaction action="commit">
</cftransaction>
It is right? What is the best practice? Not all instances cftransactionfollow the above example. Some have only start and end tags.
, . set transaction isolation level read committed , .