Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataAdapter.Update() trouble

Status
Not open for further replies.

Light777

Programmer
May 15, 2003
32
0
0
US
I have a DataTable with a DataAdapter in a Dataset that I created using the the dataset tools within Visual Studio. I had it create the INSERT/UPDATE/DELETE commands automatically for me and looking at them they look correct.

I have written a bunch of code to then populate/change the data within this datatable. Looking at the data within the datatable just before I call DataAdapter.Update() everything looks correct.

I have also tried creating a new datatable with the first datatable.GetChanges() method and all of the rows that need to be updated are in that datatable.

I populate the datatable with the datatable.LoadDataRow(array[], false) method so that it does not accept the changes when I load the data.

The trouble is that when I call the DataAdapter.Update() method it throws a DBConcurrencyException. I have also turned on and off the optimistic concurrency to see if that makes any difference. The application that I am creating is the only application that will write data to this table. Other applications read the data, but this application is the only one that writes it.

I would appreciate any help anyone can give me on this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top