O
optictygre
Hi folks.
I have a couple questions about updating data from a dataset to a
database using a data adapter. If I declare an adapter, set the
batchupdatesize property to 0, and then call the
adapter.Update(dataset.GetChanges) function, will the entire batch
update fail if the database returns an error on one row of the data?
For example, if I have a dataset with 100 rows of data that needs
inserted into the database, but the database throws back a unique
constraint error on one of the rows, my program throws an error on the
adapter,update function. In that case, do any of the 100 rows get
inserted? Is there any way just to catch the error on a particular
row, yet continue inserting the rest of the rows?
Thanks for any help!
-Jason
I have a couple questions about updating data from a dataset to a
database using a data adapter. If I declare an adapter, set the
batchupdatesize property to 0, and then call the
adapter.Update(dataset.GetChanges) function, will the entire batch
update fail if the database returns an error on one row of the data?
For example, if I have a dataset with 100 rows of data that needs
inserted into the database, but the database throws back a unique
constraint error on one of the rows, my program throws an error on the
adapter,update function. In that case, do any of the 100 rows get
inserted? Is there any way just to catch the error on a particular
row, yet continue inserting the rest of the rows?
Thanks for any help!
-Jason