Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CF9 IDENTITYCOL bug?

New Here ,
May 28, 2010 May 28, 2010

This one is hard for us to reproduce...  we recently upgraded from CF8 Enterprise to CF9 Enterprise (version 9,0,0,251028), connected to a SQL Server 2005 SP3 database (version 9.0.4053) ... we have a CFQUERY that does an INSERT and is occassionally failing to return an IDENTITYCOL in the result structure.  The record is correctly inserted into the table and no error is thrown by the CFQUERY.  The datasource is using the Microsoft SQL Server driver.

The OS is 32-bit Windows 2003 SP2 Enterprise.

TOPICS
Database access
936
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 14, 2010 Jul 14, 2010

Has anyone found a solution to this? We are running into the same issue using the same version of CF9 on SQL 2000. It is very hard to diagnose because it happens intermittenly.

TIA

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 14, 2010 Jul 14, 2010

FWIW, I ended up changing my code to the "old fashioned" SELECT @@IDENTITY AS new_id technique in order to eliminate the errors on our CF9 system.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 29, 2010 Jul 29, 2010
LATEST

Generally SCOPE_INDENTITY() should be used instead of @@IDENTITY

http://msdn.microsoft.com/en-us/library/ms190315.aspx

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources