Forum Moderators: open
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 'trial.dbo.people_individual'; column does not allow nulls. INSERT fails.
I know this might be very simple but could somebody point me in the right direction......thank you so much.
Is seems as if you have a NOT NULL-constraint on the field 'ID' of your table 'trial.dbo.people_individual', which means you must give a value for that field when inserting data into that table (you pointed that one out yourself).
Make sure you have values for all fields! Your SQL-statemen t probably looks like
INSERT INTO trial.dbo.people_individual (field1, field2 etc) VALUES('sometext', 'moretext' etc)
INSERT INTO trial.dbo.people_individual (id, field1, field2 etc) VALUES(NULL, 'sometext', 'moretext' etc)
INSERT INTO trial.dbo.people_individual (id, field1, field2 etc) VALUES(1, 'sometext', 'moretext' etc)
I got the problem sorted this morning.....when I made the table in SQL I didn't put the identity of the id column to 'Yes(Not for Replication)'.....this allows the id column to go up in value without you putting any information in the ASP code.
Just a simple thing but can drive you crazy.
So....still got lots to learn I know...
Thanks for your help :-)