I created a simple table with an ID field and text string field. The ID field is Primary Key integer and set the Identity specification so as to auto increment the ID. I then used the Data Source Configuration wizard to create a strongly typed DataSet in the project. But now I can't figure out how to add a row to the table. If I don't include a value in the ID column I get a null exception. How do I do this properly?
vb.net Code:
  1. Using taTestMe As New TestMeDataSetTableAdapters.ErrorsTableAdapter, dtErrors As New TestMeDataSet.ErrorsDataTable
  2.     Dim drNew As TestMeDataSet.ErrorsRow
  3.     drNew = dtErrors.NewErrorsRow
  4.     'drNew.ID = 1
  5.     drNew.Message = "Test 3"
  6.     dtErrors.Rows.Add(drNew)
  7.     taTestMe.Update(dtErrors)
  8. End Using
Thank you for taking the time to read my post.