Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 database backup and restore

Author  Topic 

weisgerber
Starting Member

1 Post

Posted - 2010-11-15 : 11:08:43
I have a SQL Server 2000 database with some fields, named "RI", with Identity_Specification = "yes". when I backup the database and restore it to a 2008 server everything works fine. when it is restored to another 2000 server, and I run the same application, I get an error that I cannot enter a "null" value in the "RI" field.

Shouldn't "RI" auto-increment? Is there some difference in the SQL command for 2000 vs. 2008?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-11-15 : 19:04:54
There shouldn't be any difference between the two regarding the identity option.

Have you tried a quick test with an INSERT, like this:?

INSERT INTO YourTable(Column2, Column3, ...)
VALUES(...) --where Column1 is excluded from the list and is the identity column

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -