I usually do this (Presuming that you are using AutoNumbering).

<cfquery datasource=#Application.DSN#>
 INSERT INTO.....
</cfquery>

<cfquery datasource=#Application.DSN# Name="qSomeName">
 Select MAX(Some_ID) AS LastID
 From Sometable
</cfquery>

<cfquery datasource=#Application.DSN# Name="qWhatever">
 Select Something
 From Somewhere
 Where ID = #qSomeName.ID#
</cfquery>

---------- Original Message ----------------------------------
From: Steven  Lancaster <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date:  Mon, 12 Nov 2001 15:51:27 -0600

>I have a form which inserts data into an access database. Once that data is
>inserted I need to access the ID for that data so that I can send a URL in
>an email for them to click on so that the information can be updated by
>somebody else. I am running into the problem once I insert it tells me it
>does not understand #id#. I do a query right after the insertion so that it
>can pull that info, but how do I cross reference?
>
> Steven Lancaster
> WebMaster
> Core Laboratories
> 6316 Windfern
> Houston, TX 77040
> 713-328-2532 (Office)
> 713-328-2150 (Fax)
> 832-259-3010 (Cell)
> mailto:[EMAIL PROTECTED]
>
> http://www.corelab.com
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
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

Reply via email to