I'm not sure about whether CFTRANSACTION only applies to database
stuff....can someone clears this up?

What I do know is that if you have say 2 CFQuery's - one which inserts a
bunch of records and then the next updates them say,  then, if the insert
succeeds but the update fails then the insert will be 'rolled' back.  This
is because the command is stored in memory until all commands between the
<CFTRANSACTION> and the </CFTRANSACTION> completed successfully.  However -
if you are using SQL Server I would strongly suggest using TRANSACTIONS
within your SQL rather than using CFTRANSACTION as all CF cares about is
whether the call to the SP or whatever was successfull.  SQL may have done
something different to what you expected.  You will get much tighter control
if you let SQL take care of the transactions

-----Original Message-----
From: Terri Stocke [mailto:[EMAIL PROTECTED]]
Sent: 24 August 2000 12:48
To: [EMAIL PROTECTED]
Subject: "Newbie" trying to understand CFTRANSACTION


Hi All,

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?

Thanks!
T
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

----------------------------------------------------------------------------
--
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.
------------------------------------------------------------------------------
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.

Reply via email to