RE: cftransaction quick question

2003-07-09 Thread Dave Watts
> 1) You must never, never, _never_ prompt for user response > inside a transaction! The Database 101 Fairy will smack you > upside your head with his widdoo wand! Adam, do you mind if I borrow that line? It's a keeper! Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797

RE: cftransaction quick question

2003-07-09 Thread Dave Watts
> Are you saying that this type of code is > wrong/inefficient/bad practice? > > > > > > some action sql > > > > > > > > > > >

Re: cftransaction quick question

2003-07-09 Thread Adam Churvis
> hmm, I think you will be shocked by what db system schema people will > generate etc... ;-) What do you mean? Respectfully, Adam Phillip Churvis Member of Team Macromedia Advanced Intensive ColdFusion MX Training ColdFusion MX Master Class: July 14 - 18, 2003 http://www.ColdFusionTraining.com

Re: cftransaction quick question

2003-07-09 Thread Adam Churvis
> Are you saying that this type of code is wrong/inefficient/bad practice? It is wrong. You only have one statement, so it is an atomic action in and of itself. This makes the statement an implicit transaction as far as the database is concerned, so it need not be defined as part of an explicit

RE: cftransaction quick question

2003-07-09 Thread Robertson-Ravo, Neil (RX)
hmm, I think you will be shocked by what db system schema people will generate etc... ;-) -Original Message- From: Adam Churvis [mailto:[EMAIL PROTECTED] Sent: 09 July 2003 17:23 To: CF-Talk Subject: Re: cftransaction quick question > what if you want to perform an action, ope

Re: cftransaction quick question

2003-07-09 Thread Adam Churvis
> what if you want to perform an action, open a transaction , view the results > and the commit/rollback depending on status? 1) You must never, never, _never_ prompt for user response inside a transaction! The Database 101 Fairy will smack you upside your head with his widdoo wand! Think about

RE: cftransaction quick question

2003-07-09 Thread Barney Boisvert
Neil (RX) > [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 09, 2003 9:10 AM > To: CF-Talk > Subject: RE: cftransaction quick question > > > what if you want to perform an action, open a transaction , view > the results > and the commit/rollback depending on status? > &

RE: cftransaction quick question

2003-07-09 Thread David Collie (itndac)
Hi Adam, Cheers for the pointers, as usual a few queries > 3) Transactions must be controlled as close to the data as > possible, so stored procedures must have their own > transactional controls and either succeed or fail as a single > call. Don't "return an error code"; just throw an e

RE: cftransaction quick question

2003-07-09 Thread Robertson-Ravo, Neil (RX)
what if you want to perform an action, open a transaction , view the results and the commit/rollback depending on status? -Original Message- From: Adam Churvis [mailto:[EMAIL PROTECTED] Sent: 09 July 2003 17:02 To: CF-Talk Subject: Re: cftransaction quick question > I would test t

Re: cftransaction quick question

2003-07-09 Thread Adam Churvis
> I would test this carefully because I'm not convinced that CFTRANSACTION can be used to control the actions of a SP. I believe it is for CFQUERY only. Can anyone confirm this? > > Yes, you can return success/failure codes from the SP to CF, but at that point all the SP's queries have executed a

RE: cftransaction quick question

2003-07-09 Thread David Collie (itndac)
Point noted;-) > -Original Message- > From: Robertson-Ravo, Neil (RX) > [mailto:[EMAIL PROTECTED] > Sent: 09 July 2003 15:38 > To: CF-Talk > Subject: RE: cftransaction quick question > > > you do in the UK...it will land you a fine! > > -Or

RE: cftransaction quick question

2003-07-09 Thread Robertson-Ravo, Neil (RX)
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 ne

RE: cftransaction quick question

2003-07-09 Thread David Collie (itndac)
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 quic

RE: cftransaction quick question

2003-07-09 Thread Lofback, Chris
- > From: Robertson-Ravo, Neil (RX) > [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 09, 2003 9:43 AM > To: CF-Talk > Subject: RE: cftransaction quick question > > > -- No need for cftransaction on a single SQL query > > >> True, but to avoid ugly e

RE: cftransaction quick question

2003-07-09 Thread Robertson-Ravo, Neil (RX)
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

RE: cftransaction quick question

2003-07-09 Thread Jordan Thomas
3:45 PM To: CF-Talk Subject: RE: cftransaction quick question 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 J

RE: cftransaction quick question

2003-07-09 Thread David Collie (itndac)
> 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 a

RE: cftransaction quick question

2003-07-09 Thread Robertson-Ravo, Neil (RX)
well then, from my experience with Oracle etc...you should always need to use a transaction type method -Original Message- From: David Collie (itndac) [mailto:[EMAIL PROTECTED] Sent: 09 July 2003 15:11 To: CF-Talk Subject: RE: cftransaction quick question Hi Soz guys woz in a meeting

RE: cftransaction quick question

2003-07-09 Thread David Collie (itndac)
TED] > Sent: 09 July 2003 14:49 > To: CF-Talk > Subject: RE: cftransaction quick question > > > Sorry, is this for mySQL? if so, ignore all of the stuff > regarding SP's! > > > > -Original Message- > From: Jordan Thomas [mailto:[E

RE: cftransaction quick question

2003-07-09 Thread Robertson-Ravo, Neil (RX)
Sorry, is this for mySQL? if so, ignore all of the stuff regarding SP's! -Original Message- From: Jordan Thomas [mailto:[EMAIL PROTECTED] Sent: 09 July 2003 14:45 To: CF-Talk Subject: RE: cftransaction quick question Yes, but if you want it to work then make sure to use either I

RE: cftransaction quick question

2003-07-09 Thread Jordan Thomas
:[EMAIL PROTECTED] Sent: Wednesday, 9 July 2003 3:37 PM To: CF-Talk Subject: RE: cftransaction quick question > - 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

RE: cftransaction quick question

2003-07-09 Thread Robertson-Ravo, Neil (RX)
To add : mailto:[EMAIL PROTECTED] Sent: 09 July 2003 14:37 To: CF-Talk Subject: RE: cftransaction quick question > - 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 procedur

RE: cftransaction quick question

2003-07-09 Thread Robertson-Ravo, Neil (RX)
ction should ALWAYS be used for db calls / procedures which perform updates/detes or inserts. its simple good practice and avoids errors. -Original Message- From: David Collie (itndac) [mailto:[EMAIL PROTECTED] Sent: 09 July 2003 14:26 To: CF-Talk Subject: RE: cftransaction quick que

RE: cftransaction quick question

2003-07-09 Thread 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

RE: cftransaction quick question

2003-07-09 Thread David Collie (itndac)
> -Original Message- > From: Robertson-Ravo, Neil (RX) > [mailto:[EMAIL PROTECTED] > Sent: 09 July 2003 14:07 > To: CF-Talk > Subject: RE: cftransaction quick question > > > No true (well at least for Stored Procedures) as what if the > SP does 10 other th

RE: cftransaction quick question

2003-07-09 Thread Lofback, Chris
Robertson-Ravo, Neil (RX) > [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 09, 2003 9:07 AM > To: CF-Talk > Subject: RE: cftransaction quick question > > > No true (well at least for Stored Procedures) as what if the > SP does 10 > other things before the actu

RE: cftransaction quick question

2003-07-09 Thread David Collie (itndac)
nice, thanks :-) > -Original Message- > From: Lofback, Chris [mailto:[EMAIL PROTECTED] > Sent: 09 July 2003 14:04 > To: CF-Talk > Subject: RE: cftransaction quick question > > > > My thinking is that if the single query fails, there > wouldn't be a

RE: cftransaction quick question

2003-07-09 Thread Robertson-Ravo, Neil (RX)
: Lofback, Chris [mailto:[EMAIL PROTECTED] Sent: 09 July 2003 14:04 To: CF-Talk Subject: RE: cftransaction quick question > My thinking is that if the single query fails, there wouldn't be any > need for a rollback how does that sound? Sounds good to me. AFIK, a query either succee

RE: cftransaction quick question

2003-07-09 Thread Lofback, Chris
> My thinking is that if the single query fails, there wouldn't be any > need for a rollback how does that sound? Sounds good to me. AFIK, a query either succeeds or fails--there's no such thing as partial success in a SQL statement. So if the query fails, there's no change in the DB that