S
Some Bloke
Hi,
I'm trying to write a data layer for to persist regularly occuring
stats to a database using ADO.NET by collecting a few records then
updating the database in batches.
I've got a Dataset that is generated with MSDataSetGenerator that I
add rows to then pass to the Update method of the generated
TableAdapter.
When I set the batch size to anything more than 1, I get "When
batching, the command's UpdatedRowSource property value of
UpdateRowSource.FirstReturnedRecord or UpdateRowSource.Both is
invalid"
Doing a search for that exception returns no results, hence me asking
for help, but looking into it I see that UpdateRowSource.Both is the
default value but the generated InitAdapter() method of the
TableAdpater that creates the update/insert commands doesn't override
this, leading to the exception.
Strangely this did appear to be working at one point but I can not
figure out what has changed.
How can I get the code generator to set the UpdateRowSource to None?
Or is there something that I could have missed that would cause this?
Possibly a change to the database?
Thanks for any help.
I'm trying to write a data layer for to persist regularly occuring
stats to a database using ADO.NET by collecting a few records then
updating the database in batches.
I've got a Dataset that is generated with MSDataSetGenerator that I
add rows to then pass to the Update method of the generated
TableAdapter.
When I set the batch size to anything more than 1, I get "When
batching, the command's UpdatedRowSource property value of
UpdateRowSource.FirstReturnedRecord or UpdateRowSource.Both is
invalid"
Doing a search for that exception returns no results, hence me asking
for help, but looking into it I see that UpdateRowSource.Both is the
default value but the generated InitAdapter() method of the
TableAdpater that creates the update/insert commands doesn't override
this, leading to the exception.
Strangely this did appear to be working at one point but I can not
figure out what has changed.
How can I get the code generator to set the UpdateRowSource to None?
Or is there something that I could have missed that would cause this?
Possibly a change to the database?
Thanks for any help.