Barry,

You do have almost the same warped humour as Scott Barnes!!

Anyway the data is critical but not as critical as others, the point is that
I use the cftransaction because there is a loop of 3 inserts and if one
fails they all need to fail so that is why I have it inside a cftry block.

Yeah I must admit I have been also wondering about this for some time, never
had any issues with it as I have in the last 5 years been using SQL Server
and never did anything much before that like this.

My point I guess is if 2 people were to hit this same query at the same
time, would I need a serialization on this transaction block if I used the
@@Identity I guess I'll leave the serialization in for now on it and keep an
eye on how it works!!


 
Regards
Andrew Scott
Technical Consultant

NuSphere Pty Ltd
Level 2/33 Bank Street
South Melbourne, Victoria, 3205

Phone: 03 9686 0485  -  Fax: 03 9699 7976


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Barry Beattie
Sent: Thursday, 29 July 2004 1:19 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: CFTransaction and CFC's


so you're using SQLServer as a db? that's the only db I know of that knows
@@identity AND have multiple SQL statements in the same cfquery block.

in this case, because they are in the same cfquery you probably wouldn't
even need a transaction.

mind you, that's assuming that:

<cfquery> == conn.open(dsn)
</cfquery> == conn.execute(SQL); conn.close()

that's the point I was trying to make: without knowing what the underlying
java is doing, you have no way of knowing for certain.

I was asking Gary Menzel about this (he has ADO/MS knowledge so he
understood what I was talking about). He doesn't trust doing it this way at
all. They work with mission critical systems (other peoples $$$) and they
generate their own UUID's  - gave up on @@identity as a possible hole for
this very reason. Works fine with ADO's connection objects but anything else
is a mystery.

I'm sorry this isn't a definative answer. I've been asking similar questions
for a while and have not gotten a concrete answer. I've only bored you to
tears with this because no one else has bothered to give a more accurate
answer (today or in the past - and I *have* looked). I was hoping some of
the background knowledge might help towards a more specific answer to your
question because I (no anyone else it seems) can't give you one.

HOWEVER...

99.99% of the time you should be able to get away without a transaction
(being in the same cfquery block). You could possibly get away with less
strong isolation than serializable (if forced to using multi cfquery's and
cftransaction). Everyone I've asked on CFCZone.org list says it should be
fine - no one goes to any great lengths to ensure data integrity. Hell, most
people don't even bother with cftransaction!

but this isn't the 100% answer you were looking for. Sorry. 

mate, just go ahead and do it. by the time it errors (hopefully never), you
should be sipping pina coladas at Acapulco!

cheers
barry.b


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to