----- Original Message -----
From: "Eric Dawson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 12, 2000 12:20 PM
Subject: MS Access getting the FieldID from a newly inserted record


 I am using access 2000 for an intranet site, and would like to know how to
 get the recordid of a newly created record.
here is the code.
<cfquery name="AddRecord"
datasource="#DSN#">
INSERT INTO TableName
(FieldName)
VALUES('#Form.FieldValue#')
</cfquery>
=====================
<cfquery datasource="#DSN">
select @@identity as ID_num
</cfquery>

<cfoutput query="test">
#ID_num#
</cfoutput>

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to