I have a problem with updating an Access database from a datatable. I have two rows of data in my database at the moment for testing, the first row is an ID number (primary key), the second is a name and the third is a price.
I can get this data out of the database, store it in a datatable in a dataset and display the name in a listbox with the name and price displayed in textboxes.
If I change the data for the second row data in the app, the updates go into the database OK. Then when I make changes to the first row data, I get odd things happening to the data in the database. I basically merges the names into one and puts it in the database. i.e. if the name in row 1 is aaaa and row 2 is bb, If I change row 1 to aaaa1 I now get bbaaa1 in the database.
This only happens if I change the data in row 2 before row 1 data.
As far as I can tell by debugging in the RowUpdating event handler, the data in the rows is correct in the datatable, and there are no errors in the rows.
the code I use for the update is
Expand|Select|Wrap|Line Numbers
- adapterProductDetails.Update(dtProductDetails);
Any thoughts?
Thanks