How to solve the INSERT table error below
-
System.Data.OleDb.OleDbException: The statement has been terminated. Cannot insert the value NULL into column 'bcId', table 'ForumVB.dbo.forumTopics'; column does not allow nulls. INSERT fails. at System.Data.OleDb.OleDbDataReader.NextResults(IMultipleResults imultipleResults, OleDbConnection connection, OleDbCommand command) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at dotForumTopicAdd.addTopic.submitter_update(Object sender, CommandEventArgs e):sigh:
-
System.Data.OleDb.OleDbException: The statement has been terminated. Cannot insert the value NULL into column 'bcId', table 'ForumVB.dbo.forumTopics'; column does not allow nulls. INSERT fails. at System.Data.OleDb.OleDbDataReader.NextResults(IMultipleResults imultipleResults, OleDbConnection connection, OleDbCommand command) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at dotForumTopicAdd.addTopic.submitter_update(Object sender, CommandEventArgs e):sigh:
-
It seems that the message tells the story. Or you set a non null value for bcId or you make it nullable in the DB.
yup, i set non null value for bcId, but i forget 2 set it automatic generate number because i use bcId is primary key and is not get the value from user keyin.... So after i set bcId to auto generate number in database then my erorr was solve already :-O anyway thanks for reply n all d best 2 u :rose: -- modified at 6:06 Tuesday 17th January, 2006