May 3, 2006 at 8:09 pm
Hi,
I have very little knowledge of SQL (have used Access only)
I have an existing database that I have transferred to a new server. The old server supported SQL 2000, the new one is SQL 2005.
I get the following error:
Cannot insert the value NULL
When trying to insert a new record into a table (via a stored procedure).
The value in question is the index (i.e. it is an int, indenty specification = yes, increment = 1, seed = 1) allow null is false.
Like I said this was working fine on an SQL 2000 system, but now the insert does not work (although other operations seem to work fine.)
Thanks in advance
Mitch
May 3, 2006 at 8:16 pm
The issue does not appear to be related to the identity column, but to some other column that is defined as 'NOT NULL'. The reason being that the identity column would increment automatically each time a new record is inserted (even when the insert was unsuccessful!).
You might like to post the table schema and the insert statement that you used.
May 5, 2006 at 8:42 am
Forgive the foolish question but in your stored procedure are you attempting to insert a value into this index field? If so remove that potion of the code and try again.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply