I usually do not auto number, I always insert a UUI!
Before my inserts:
<cfset variables.newid = "#createuuid()#">
<cfquery>
insert.....
</cfquery>
Then variables.newid is always available.
Paul Giesenhagen
QuillDesign
Home of SiteDirector - Commerce Builder
http://ww.quilldesign.com
> It seems to me that there are three basic ways to get the id of the row
you
> just inserted.
> 1) @@identity
> and
> 2) cflocking the insert statement and the select max(id) statement.
> and
> 3) qualifying the select max(id) statement to avoid problems caused by
> multiple threads.
>
> I'm curious which method people use and which they find to be the best.
>
>
______________________________________________________________________
Dedicated Windows 2000 Server
PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists