tracker issue : CF-3490074

select a category, or use search below
(searches all categories and all time range)
Title:

Please consider normalizing the result key for the identity value of a newly inserted row

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Adam Tuttle / Adam Tuttle (Adam Tuttle)

Created: 01/25/2013

Components: Database

Versions: 10.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Platforms All

Vote Count: 1

Currently, when you insert a record and want the inserted ID, you have to know which database platform is in use so that you can get the id value. See the docs here: http://cfdocs.org/cfquery

reuslt.INDENTITYCOL -- sql server only
result.ROWID -- oracle only
result.SYB_IDENTITY -- sybase only
result.SERIAL_COL -- informix only
result.GENERATED_KEY -- mysql only

I can't think of a valid reason that these should not be normalized into one database agnostic result key.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3490074

External Customer Info:
External Company:  
External Customer Name: Adam.Tuttle
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

@Adobe, can result.GENERATEDKEY *please* be documented? It has been mentioned many times by commenters on the cfquery docs, but the comments end up being deleted and the change is never implemented. @Adam, result.GENERATEDKEY is the key you're looking for. Thanks!, -Aaron
Comment by External U.
16509 | January 29, 2013 05:26:47 AM GMT
sounds like a good idea to me.
Vote by External U.
16511 | February 09, 2013 04:33:49 AM GMT
Check https://learn.adobe.com/wiki/display/coldfusionen/cfquery
Comment by Rupesh K.
16510 | September 04, 2013 09:03:32 AM GMT