If you are doing an "autonumber" type deal, just do the following
<insert stuff>
<cfquery datasource="dsn" name="getid">
select MAX(id)
from tablename
</cfquery>
That should do it for ya!
Paul Giesenhagen
QuillDesign
----- Original Message -----
From: "Kris Pilles" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, May 21, 2002 8:05 AM
Subject: Query help
> How can Insert a record into a table (that I know how to do) but after
> the insert, I want to be able to know what the primary key for the
> record I just inserted...
>
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
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