tracker issue : CF-3947080

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

cfquery result no longer returns IDENTITYCOL with MSSQL 2012

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/CannotReproduce

Reporter/Name(from Bugbase): steve johnson / steve johnson (steve johnson)

Created: 03/02/2015

Components: Database

Versions: 11.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Win 2012 Server x64

Vote Count: 0

Problem Description: It appears that MSSQL 2012 has deprecated identitycol so it no longer shows up in the result struct. 

Steps to Reproduce: dump the result struct from a insert into mssql 2012

Actual Result: no identitycol in result

Expected Result: identitycol in result

Any Workarounds:

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

Watson Bug ID:	3947080

External Customer Info:
External Company:  
External Customer Name: steve
External Customer Email:  
External Test Config: My Hardware and Environment details:



It's worth noting that as a rule of thumb your code should reference result.generatedKey rather than result.identityCol, as CF copies the value there regardless of what the db-platform-specific key is.
Comment by External U.
8216 | March 02, 2015 12:07:52 PM GMT
Agreed, but there is no generatedKey result either, I imagine because there was no identitycol value to copy.
Comment by External U.
8217 | March 02, 2015 12:18:30 PM GMT
Which version of SQL 2012 are you using? R2 gives the correct results. With both identitycol and generatedKey having the correct values.
Comment by External U.
8218 | March 05, 2015 04:09:27 AM GMT
Hi Steve, Can you please check the value of "Disable Autogenerated Keys" for your data source? Navigate to Data & Services > Data Sources > DSN > Show Advanced Settings > Disable Autogenerated Keys. If it is checked, then please uncheck it and submit the data source.
Comment by Nimit S.
8219 | April 14, 2015 07:04:45 AM GMT
Box is not checked. Does not return identitycol or generatedKey in the result struct. Version: Microsoft SQL Server Web (64-bit) 12.0.2000.8
Comment by External U.
8220 | April 15, 2015 01:50:51 PM GMT
That version is SQL 2014, not 2012? There is a sp1 for that release too. Also what update of cf11 are you running as they added support for SQL 2014 in update 3.
Comment by External U.
8221 | April 15, 2015 02:01:17 PM GMT
You are correct, my fault. New server install, saw the 12, went with that. So lets pretend I said SQL 2014, does this NOW become a known issue? CF11 Update 5.
Comment by External U.
8222 | April 15, 2015 02:14:27 PM GMT
Hi Steve, It is working properly at our end. Please share the settings summary of CF server or you can contact for further troubleshooting.
Comment by Nimit S.
8223 | May 19, 2015 02:44:14 AM GMT
Hi Steve, Please provide below mentioned details along with datasource name being used if you are still facing this issue.
Comment by Nimit S.
8224 | August 13, 2015 08:27:49 AM GMT
Hi Steve, It would really help if you can share the settings summary and the data source which you are using.
Comment by Nimit S.
8225 | August 19, 2015 04:01:34 AM GMT
Hi Steve, We have tried replicating it but unable to observe this issue. It has been a long time since we have received any update on this. Please let us know if you are still facing this issue.
Comment by Nimit S.
8226 | August 20, 2015 08:21:42 AM GMT
Hi Steve, It has been a long time since we have received any update on this. So we are closing this bug. If you are still facing this issue please feel free to reach us.
Comment by Nimit S.
8227 | August 24, 2015 05:06:23 AM GMT