SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Problems having moved database
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

baltiboy
Starting Member

United Kingdom
1 Posts

Posted - 01/29/2013 :  14:14:12  Show Profile  Reply with Quote
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

USA
5072 Posts

Posted - 01/29/2013 :  15:08:09  Show Profile  Visit russell's Homepage  Reply with Quote
make sure the ID column is an identity column.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.25 seconds. Powered By: Snitz Forums 2000