> I'm reading about this CFTRANSACTION tag, and I'm not really
> clear on what it's used for.
>
> The CF Web App Const. Kit book states that it "...implements
> transaction and
> rollback processing. Any <CFQUERY> tags placed between
> <CFTRANSACTION> and
> </CFTRANSACTION> tags are automatically rolled back if an error occurs."
>
> Am I correct in interpreting this to mean that if, for example in my own
> application, when a user submits a form to an action page that updates my
> database AND also sends off various emails, that if the query pulling the
> emails from the email table fails, the other updates to the database will
> still be made?
>
> If I'm off base here, what are the practical applications of this tag?
OK, it's used in cases where you have to add data to several tables, and
possibly across several datasources
Say you was adding a new item to a shopping cart, and it had several entries
into the product reference table
If any of the inserts fail, then nothing would be added, so you don't get
orphan records
Another possible use, is to get the latest identity from a table - it's not
100% effective for this, but works on smaller applications
HTH
Philip Arnold
ASP Multimedia Limited
T: +44 (0)20 8680 1133
"Websites for the real world"
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.