Uhm No.

That's the easiest way, but you won't always get the last one inserted.  If
your page gets enough traffic, most inserts will work, but on occasion one
person might see the other's work...  If you use sql server, write a sproc
with @@Identity returning to a variable...


-----Original Message-----
From: Bryan LaPlante [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 23, 2001 5:57 PM
To: CF-Talk
Subject: Re: SQL INSERTS - return ID


select max(id) as maxID from tablename

----- Original Message -----
From: "Matt Eschenbaum" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, April 23, 2001 6:36 PM
Subject: SQL INSERTS - return ID


> Anyone know a trick to return the ID of a record just Inserted into a
table?
>
> Sincerely,
>
> Matthew M. Eschenbaum
> Allaire Certified Professional
> DevTech Inc.
> [EMAIL PROTECTED]
> 206.956.0888
> www.dev-tech.com
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to