Here I have a table of name
Student_Images(id int identity(100,2),ImageName varchar(50),Imagepath varchar(100),Imageblob image)
Here is my store procedure
ALTER procedure [dbo].[getStudentImagessp](
@ImageName varchar(50),
@Imagepath varchar(100),
@Imageblob image,
@type nvarchar(3)
)
as begin
if(@type='i')
begin
insert into [Student_Images](ImageName,Imagepath,Imageblob) values(@ImageName,@Imagepath,@Imageblob)
end
end
I am sending parameters of
@ImageName,@Imagepath,@Imageblob,@type from frond end..but what the exception i was getting is
Cannot insert the value NULL into column 'Id', table;'kavali.dbo.Student_Images'; column does not allow nulls. INSERT fails.
The statement has been terminated.
..Actually there is no records present in my table, I was going to make my first record inserting, but why i was getting an exception of asking
cannot insert Null values in to column 'Id'...here i m not triying to insert null values actually i m not passing any values to my identity column from front end...is there any suggestion for me please.....