this is one way... there are many others...

<cftransaction>

(first query)

<cfquery name="getmax" datasource="#session.dsn#">
SELET max (id_column_name) as maxid
FROM tablename
</cfquery>

</cftransaction>

--------------------------------------------------------------
Mark Warrick
Phone: (714) 547-5386
Efax.com Fax: (801) 730-7289
Personal Email: [EMAIL PROTECTED]
Personal URL: http://www.warrick.net 
Business Email: [EMAIL PROTECTED]
Business URL: http://www.fusioneers.com
ICQ: 346566
--------------------------------------------------------------


> -----Original Message-----
> From: W Luke [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 29, 2000 5:00 AM
> To: CF-Talk
> Subject: AutoNumbers and INSERTS
> 
> 
> Hi,
> 
> I'm inserting a load of data into a Table of an Access Database.  The ID
> field is generated by AutoNumber.
> 
> As soon as the record has been inserted, I need to output what 
> that ID was.
> How can I do this?
> 
> Cheers
> 
> Will...
> 
> ------------------------------------------------------------------
> ------------
> 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.

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

Reply via email to