If you do not need to do rollbacks when an error occurs then you prob don't need to use it. An instance where u may need to do this.
U insert a record with query 1 U insert another record with query2 U query a table with query 3 which relies on the above 2 inserts having happened. To avoid data integrity problems, if query1 or query2 fail, you want to abandon this transaction and rollback any changes that may have occurred. So if query1 worked, and query2 didn't you don't want that useless orphan data left by query1, so you do a rollback. So you would have a CFTRANSACTION BLOCK and a TRY/CATCH block. When the try/catch blocks catches a database error inside the transaction block, you then perform your rollback. You then email yourself the results of the error. Russ > -----Original Message----- > From: Paul Swingewood [mailto:[EMAIL PROTECTED] > Sent: 03 August 2004 11:21 > To: [EMAIL PROTECTED] > Subject: RE: [ cf-dev ] <cftransaction> > > Maybe thats the answer Alex. > > I was looking back through my notes on the advanced course > for cf5.0 (a few years ago now) and noticed that several > queries were under a <cftransaction> tag. > > It works as is but I just thought what does that do ... > > Regards - Paul > > > >From: "Alex Skinner" <[EMAIL PROTECTED]> > >Reply-To: <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Subject: RE: [ cf-dev ] <cftransaction> > >Date: Tue, 3 Aug 2004 10:45:01 +0100 > > > >Paul can I ask why you need to use cftransaction. What is > the desired > >functionality ? > > > >I can't see how it would increase speed. If you're on SQL Server you > >could use a stored procedure with transactional logic with multiple > >result sets but again depends what youre trying to do ? > > > > > >Alex > > > >-----Original Message----- > >From: Paul Swingewood [mailto:[EMAIL PROTECTED] > >Sent: 03 August 2004 10:22 > >To: [EMAIL PROTECTED] > >Subject: [ cf-dev ] <cftransaction> > > > >I have 5 queries which populate drop down lists. > >I have just been reading up on <cftransaction>. Should I put all of > >these queries inside a <cftransaction> tag? - Does this > increase speed? > >- How & why? > > > >I don't think I need all this rollback stuff as I am only reading to > >populate dropdown lists. > > > > > >Regards - Paul > > > > > > > >-- > >These lists are syncronised with the CFDeveloper forum at > >http://forum.cfdeveloper.co.uk/ > >Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > >CFDeveloper Sponsors and contributors:- *Hosting and support > provided > >by CFMXhosting.co.uk* :: *ActivePDF provided by activepdf.com* > > *Forums provided by fusetalk.com* :: *ProWorkFlow provided by > >proworkflow.com* > > *Tutorials provided by helmguru.com* :: *Lists hosted by > >gradwell.com* > > > >To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > >--- > >Incoming mail is certified Virus Free. > >Checked by AVG anti-virus system (http://www.grisoft.com). > >Version: 6.0.657 / Virus Database: 422 - Release Date: 13/04/2004 > > > > > >--- > >Outgoing mail is certified Virus Free. > >Checked by AVG anti-virus system (http://www.grisoft.com). > >Version: 6.0.657 / Virus Database: 422 - Release Date: 13/04/2004 > > > > > > > > > >-- > >These lists are syncronised with the CFDeveloper forum at > >http://forum.cfdeveloper.co.uk/ > >Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > >CFDeveloper Sponsors and contributors:- *Hosting and support > provided > >by CFMXhosting.co.uk* :: *ActivePDF provided by activepdf.com* > > *Forums provided by fusetalk.com* :: *ProWorkFlow provided by > >proworkflow.com* > > *Tutorials provided by helmguru.com* :: *Lists hosted by > >gradwell.com* > > > >To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > > -- > These lists are syncronised with the CFDeveloper forum at > http://forum.cfdeveloper.co.uk/ > Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > CFDeveloper Sponsors and contributors:- > *Hosting and support provided by CFMXhosting.co.uk* :: > *ActivePDF provided by activepdf.com* > *Forums provided by fusetalk.com* :: *ProWorkFlow > provided by proworkflow.com* > *Tutorials provided by helmguru.com* :: *Lists > hosted by gradwell.com* > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > -- These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/ Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ CFDeveloper Sponsors and contributors:- *Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by activepdf.com* *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com* *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com* To unsubscribe, e-mail: [EMAIL PROTECTED]