I don't know if this should be in the SQL forum or here, but here goes.
I have a development and production instance of my code and this works fine on dev (of course!). Both servers have the same setup (using SQL Server 2000). In my code, I am inserting a record into a table and retrieving the @@IDENTITY value. However, the prod code is returning NULL. I have traced it down to the fact that I already have an open recordset on the table I am inserting into. If I close that recordset prior to my insert, then the identity value is returned successfully. Does anyone know if there is some setting in the DB or table level somewhere that is causing me to lock it with the open recordset??
Any help would be appreciated!
I have a development and production instance of my code and this works fine on dev (of course!). Both servers have the same setup (using SQL Server 2000). In my code, I am inserting a record into a table and retrieving the @@IDENTITY value. However, the prod code is returning NULL. I have traced it down to the fact that I already have an open recordset on the table I am inserting into. If I close that recordset prior to my insert, then the identity value is returned successfully. Does anyone know if there is some setting in the DB or table level somewhere that is causing me to lock it with the open recordset??
Any help would be appreciated!