Key of record just inserted

Anyone know how to access the key of the record just inserted in a cfquery insert statement?
lauriepmissoulaAsked:
Who is Participating?
 
cfhubConnect With a Mentor Commented:
There are a couple of ways:

The "best" would also incorporate a CFTRANSACTION tag (just in case something goes wrong)

http://cfhub.com/advanced/cftransaction/example2.cfm



More simply, something like this should work (Access/MS SQL only)

http://www.cfhub.com/sql/accesstips/autonumber.cfm
0
 
lauriepmissoulaAuthor Commented:
Thanks for the quick helpful response!
0
All Courses

From novice to tech pro — start learning today.