We have a VB6 program using ODBC to execute a couple of simple statements that turns the IDENTITY_INSERT ON for a table, inserts data, then turns IDENTITY_INSERT OFF.
The code has executed without problems using the SQL Server driver that comes with Windows 2000/XP. However when we set up an ODBC connection using SQL Server 2005 Native Driver, the IDENTITY_INSERT ON executes without error but the insert statement
crashes with the error "Cannot insert explicit value for identity column in table 'TableName' when IDENTITY_INSERT is set to OFF"
Does the SQL Server 2005 Native Driver handle this command differently? And if so how can we get it to execute correctly?
View Complete Post