SQLTeam.com | Weblogs | Forums

When insert data to mask exception i get error why and how to solve it?

I work on SQL server 2012 I get error I can't know which place come and how to solve it .

erro : Cannot insert the value NULL into column 'MaskID', table 'ConflictReport.dbo.MaskExceptions'; column does not allow nulls. INSERT fails.
The statement has been terminated.

GO

CREATE TABLE [dbo].[MaskExceptions](
	[MaskExceptionID] [int] IDENTITY(1,1) NOT NULL,
	[MaskID] [int] NOT NULL,
	[FunctionName] [varchar](50) NULL,
	[FunctionID] [int] NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

when insert data on table mask exception
i get error as above
so how o solve this issue

habibi, you need to provide us a bit more than that? what is the piece of code that does the insertion?

you are inserting NULL values into NOT NULL column

+++++++++++++++++++++++++++++++++++
[MaskID] [int] NOT NULL,
insert into MaskExceptions ( MaskID ) values NULL = will not work
insert into MaskExceptions ( MaskID ) values 132 = will work
++++++++++++++++++++++++++++++++++++