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
 General SQL Server Forums
 New to SQL Server Programming
 Problems having moved database

Author  Topic 

baltiboy
Starting Member

1 Post

Posted - 2013-01-29 : 14:14:12
Hi,

I need some help please! I am almost a complete novice so really do not know what I am doing with this.

Bit of background - I created a site ages ago and have always just fumbled my way through working out what I can along with the help from others. I have a site that works...or I did! Its been that way for some time however, I recently had to move my database which resulted in my old one being deleted and a new one created. This went fine...or so I thought. I now get an error message when I try to create a new entry in the website. I get the following error message:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column 'ID', table 'tablename.dbo.Table1'; column does not allow nulls. INSERT fails.

ID is the primary key in the table and should number automatically as the entries are added to the database. This is how it has always worked up until now. It may be a really simple setting, but I dont know what it is.

I can only think that it must be something to do with the database as the ASP code for the site hasnt changed. It must have been a setting that hasnt copied across when I copied the table.

Can anyone help me PLEASE? I am stuck and dont know what else to do.

Andy

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2013-01-29 : 15:08:09
make sure the ID column is an identity column.
Go to Top of Page
   

- Advertisement -