Cannot insert the value NULL into column 'CustomerID' and similar errors.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 anni tempo fa
This is a really a great appllication and I thank you for the effort.
I have ver. 1.60 installed on a remote server.  Windows 2008, SQL 2008.

Problem:
I Imported the database from a local install to my remote webserver.  The indexes and constraints did not Import and I recieved many "Cannot insert the value NULL into column..." errors, examples below.

Solution:
I then ran the SQL scripts downloaded with the packsge located in the Install folder in the unziped site.

All errors went away.


The problems....

Cannot insert the value NULL into column 'CustomerID', table [My Database Name].dbo.Nop_Customer'; column does not allow nulls. INSERT fails.

********************
Another example..

Cannot insert the value NULL into column 'LogID', table '[My Database Name].dbo.Nop_Log'; column does not allow nulls. INSERT fails.
13 anni tempo fa
Hi comworks,
as you can see in the database definition the CustomerID is declared as a PrimaryKey, int and NotNull - so if you like to import in this table with the same keys, you could take away these definitions temporarely. But this doesn't seem to be
a good idea, because all the constraints to this table won't be working after that, except you manually fix all the ids in the corresponding tables.
So I suggest to use the given StoredProcedures to create new customers or other type of entities ...
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.