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?
Thank you for taking the time to read my post.vb.net Code:
Using taTestMe As New TestMeDataSetTableAdapters.ErrorsTableAdapter, dtErrors As New TestMeDataSet.ErrorsDataTable Dim drNew As TestMeDataSet.ErrorsRow drNew = dtErrors.NewErrorsRow 'drNew.ID = 1 drNew.Message = "Test 3" dtErrors.Rows.Add(drNew) taTestMe.Update(dtErrors) End Using




Reply With Quote
