> is there anyway to output the last primary key number in a table after an
> insert statement?
> i need to capture that number on the same action page so i can pass it to
> another table.
> in other words, on my insertApp.cfm i have the query to update my apps
> table.
> but on this same page at the bottom, i have another form...a form
> to update
> the licensing.  when i submit this form, i need that primary key from my
> apps table to pass thru to my licensing table.
> so i need a way to capture that value.

Since it's Access

Wrap the CFQuery in a CFTransaction
Insert the data
Select Max(ID) as mID from myTable
close the CFTransaction

Ugly, but it works

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to