you do in the UK...it will land you a fine! -----Original Message----- From: David Collie (itndac) [mailto:[EMAIL PROTECTED] Sent: 09 July 2003 15:35 To: CF-Talk Subject: RE: cftransaction quick question
Thanks Neil, I do agree with you though, Crap analogy but.... you don't always need to indicate in your car, but you always do don't you? > -----Original Message----- > From: Robertson-Ravo, Neil (RX) > [mailto:[EMAIL PROTECTED] > Sent: 09 July 2003 15:22 > To: CF-Talk > Subject: RE: cftransaction quick question > > > no, its not required, but its simply good practices > > -----Original Message----- > From: David Collie (itndac) [mailto:[EMAIL PROTECTED] > Sent: 09 July 2003 15:21 > To: CF-Talk > Subject: RE: cftransaction quick question > > > > well then, from my experience with Oracle etc...you should > > always need to use a transaction type method > > Sorry for labouring the point, but you say 'you should always > need'.... This implies that the transactions is REQUIRED, > whereas I do have legacy code (oh ... allright some of my > lazy code as well :-) that does not have cftransaction...... > and it works...... > > Chris, I am assuming that you are right when you say that > CFTRANSACTION will have no effect over the workings of a > stored procedure? > > Cheers for the info everyone... > > DC (Developing in CF5, Oracle 8.1.7, IIS 5) > > > > Hi > > > > Soz guys woz in a meeting...... > > > > I was talking originally about Oracle NOT MySQL.... (although > > did MySQL not get to handle transactions by version 4ish?) > > Yup, I agree that cftransaction needs to have a cftry/cfcatch > > inside it I wasn't wanting to comment on the effect > > cftransaction had on a SP cos not used them much in my > > lifetime other than to call them. DBA takes care of that > > type of stuff on our Enterprise database > > > > I guess my thinking was, 'Is there any point to the > > cftransaction in the following code?' > > > > <cfset bDBAction = True> > > <cftransaction action = "begin"> > > <cftry> > > <cfquery name="myQuery" datasource="myDatasource"> > > .... some action sql .... > > </cfquery> > > > > <cfcatch type="DATABASE"> > > <cfset bDBAction = False> > > </cfcatch> > > </cftry> > > </cftransaction> > > > > Guys, would you suggest wrapping your SELECT SQL in cftry's as well? > > > > On the note about making sure that the database supports > > transactions, I would recommend coding for it all the time no > > matter the database, as in my experience using the tag on a > > database that does not support it does not cause any errors > > and will bide well for any future upgrades > > > > DC (Developing in CF5, Oracle 8.1.7, IIS 5) > > > > > -----Original Message----- > > > From: Robertson-Ravo, Neil (RX) > > > > > > Sorry, is this for mySQL? if so, ignore all of the stuff > regarding > > > SP's! > > > > > > > > > > > > -----Original Message----- > > > From: Jordan Thomas > > > > > > Yes, but if you want it to work then make sure to use > either InnoDB > > > or one of the other transaction safe tables. You will need to > > > configure this manually. There is a good amound of docs > on how to do > > > this on www.mysql.com > > > > > > cheers > > > > > > Jordan > > > > -----Original Message----- > > > From: Lofback, Chris > > > > - No need for cftransaction on a single SQL query > > > > > > True, but I would always use a CFCATCH to trap any errors. > > > > > > > - cftansaction is good practice for a single stored > > > procedure call in > > > > case the stored procedure is doing multiple SQL queries > > > > > > I don't know if you read my previous post, but I don't > think this is > > > true. CFTRANSACTION cannot "talk" to the code inside a > SP. You must > > > write the transaction handling *within* the SP. So if > the SP does > > > 10 mods to the database, each mod within the SP must be > checked for > > > success/failure and then rolledback/committed by the SP > code itself. > > > CFTRANSACTION cannot be used to do this. > > > > > > Chris > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4