Wednesday, August 26, 2015

Dynamics GP - Cannot insert the value NULL into column 'ColumName', table 'DATABASE.dbo.TABLENAME'; column does not allow nulls. INSERT fails.

Problem
I'm doing an INSERT and not specifying all the columns, which should then use the default value. Instead i'm getting the error:
Cannot insert the value NULL into column 'ColumName', table 'DATABASE.dbo.TABLENAME'; column does not allow nulls. INSERT fails.

Solution
In my case the table is missing the default bindings. Just run this:

EXEC [dbo].[smBindTableDefaults] 0

No comments:

Post a Comment

There was an error in this gadget