I am inserting a new row into a dataset dsStaff1 via DataAdapter1.Update() method. I am getting the following error:
Cannot insert the value NULL into column 'Enabled', table 'dbo.tblStaff'; column does not allow nulls. INSERT fails. The statement has been terminated.
I do have a boolean field 'Enabled' in tblStaff, which is keyword in SQL Server I suppose. It is defaulted to 'True'. I can't really change the name of the field. Is there a work around? OR am I doing something wrong? PS: I am generating insert, update commands by an sqlcommand builder.
just pass a fixed value to the dataset in the update parameters
like