Thank you! I am typing with one arm and  I wanted to tell you I figured it
out about five minutes after I wrote the email, but I dislocated my shoulder
so it is hard to type right now.. Thanks alot I did use the cftransaction
info though..

-----Original Message-----
From: Jochem van Dieten [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 19, 2002 9:46 AM
To: CF-Talk
Subject: Re: Las record


Bryan Love wrote:
> Different DB's provide different ways of doing this, but the only
universal
> way I know of is this:
>
> Assuming the key is numeric and increments ascending:
> <cftransaction>
>       <cfquery...>
>               do the insert
>       </cfquery>
>       <cfquery...>
>               SELECT MAX(whateverID) as maxID
>               FROM tablename
>       </cfquery>
> </cftransaction>

And that does *NOT* work. Let me repeat that, because I know it is a
very common mistake. That does *NOT* work.

The only thing that will protect you from a phantom read is a
transaction with the isolation level "serializable". According to the
relevant standards, transactions should default to the isolation level
"serializable" and you should be right. However, most databases default
to "read committed", and therefore will not protect you from phantom
reads. Explicitly adding isolation="serializable" is required.

Jochem


______________________________________________________________________
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
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to