If you are using SQL server there are much more elegant and reliable ways
to return the new ID.
At 08:46 PM 4/23/2001 -0400, you wrote:
>Well, there's always the good old:
>
>SELECT MAX(ID) from MyTableName
>
>right after your insert... though there maybe a more efficient way of doing
>things, that I'm un-aware of... though, the above has worked for me on many
>occasions...
>
>Erik Yowell
>
>-----Original Message-----
>From: Matt Eschenbaum [mailto:[EMAIL PROTECTED]]
>Sent: Monday, April 23, 2001 7:36 PM
>To: CF-Talk
>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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists