Private Sub insertRow(job As String, part As String, castDate As Date, inspectDate As Date, NCIR As Integer)ĭim adapter As New As_Cast_DBDataSetTableAdapters. Here is my code and any feedback would be greatly appreciated. You should only really be using per-record methods. I've checked the original DB for changes, the one in the project folder, and the copy that is made in bin and there are no changes to any of them. Retrieve all the data into a DataTable, bind that to your UI or map the data to some other data structure and bind that, let the user do all the changes they want, map the changes back to the DataTable if necessary, then save the lot with a single call to the Update method of the table adapter. The code does not throw an exception, and it does not make a successful update to the database either. To speed up the updates make sure the primary index of the each database table is set to a field where each item is unique. I'm adding a new row to an Access 2010 database, and attempting to update the new row using TableAdapter.Update(). The TableAdapter will automatically keep track of changes to your datatables/dataset and when the update is performed only update the items that have changed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |