G
Guest
I am having a problem getting SQL Server to pass back to my datatable the value that it assigns to an identity column
I am using the Update method of a dataadapter and set the command text to the name of my stored procedure. The update method passes a datatable to SQL Server. Using enterprise manager I see that SQL Server inserted the row from the datatable and assigned a new value for the identity column, however when I display the value of the identity column from my datatable after the update, the value of the identity column is still -1. Do I need to query SQL Server for the value of the identity column and then assign it to the datatable?
I am using the Update method of a dataadapter and set the command text to the name of my stored procedure. The update method passes a datatable to SQL Server. Using enterprise manager I see that SQL Server inserted the row from the datatable and assigned a new value for the identity column, however when I display the value of the identity column from my datatable after the update, the value of the identity column is still -1. Do I need to query SQL Server for the value of the identity column and then assign it to the datatable?