I have a vb.net winform data app with sql server 2005 backend. The ID field
in the tblClients table is an 'int' identity column that does not allow
nulls. The problem is that when I try to save the record using the below
code;
Me.Validate()
Me.CompaniesBindingSource.EndEdit()
Me.CompanyTableAdapter.Update(Me.EMSDataSet.tblCli ents)
I get an 'Column 'ID' does not allow nulls' error on the second line
(EndEdit()). The first few lines of stack trace is below. What is the
problem and how can I fix it?
Thanks
Regards
----------------
Stack Trace
System.Data.NoNullAllowedException was unhandled
Message="Column 'ID' does not allow nulls."
Source="System.Data"
StackTrace:
at System.Data.DataColumn.CheckNullable(DataRow row)
at System.Data.DataTable.RaiseRowChanging(DataRowChan geEventArgs
args, DataRow eRow, DataRowAction eAction, Boolean fireEvent)