> 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
> Are you saying that this type of code is
> wrong/inefficient/bad practice?
>
>
>
>
>
> some action sql
>
>
>
>
>
>
>
>
>
>
>
> 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
> 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
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
> 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
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?
>
&
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
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
> 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
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
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
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
-
> 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
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
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
> 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
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
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
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
:[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
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
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
> - 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
> -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
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
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
: 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
> 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
29 matches
Mail list logo