Haven't tried it within CF but in a stored procedure you can use SCOPE_IDENTITY() to get the ID
-----Original Message----- From: Brian Gilbert [mailto:[EMAIL PROTECTED] Sent: Wednesday, 26 November 2003 9:12 AM To: CFAussie Mailing List Subject: [cfaussie] get primary key allocated during insert? Hi all, Is there a way to get the primary key (autonumber) that would be allocated during an insert statement in a cfquery? TIA Brian --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004 --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004
