G
Guest
I'd like to know exactly how an UpdateCommand determines that there are
concurency issues, specifically if I have supplied I created my own update
command, instead of using the SqlCommandBuilder.
The issue I am facing is I have setup a column in my DataTable to map to an
output parameter in my (update) stored proc, using
DA.UpdateCommand.UpdatedRowSource = UpdateRowSource.OutputParameters to
achieve this. This works great until there is a concurrency issue. If the
DataAdapater determines there is a concurrency issue it just skips over this
row all together. This is a problem because internal to the stored procedure
I am doing my own concurrency checking and the output param indicates this.
i.e. 0 = no error, 1 = record updated since last read and 2 = record has been
deleted since last read.
Because of the built in concurrency error the output param doesn't map to
the row and I cannot determine the exact error. This built in concurrency
error is not specific enough for us.
A first chance exception of type 'System.Data.DBConcurrencyException'
occurred in System.Data.dll
Additional information: Concurrency violation: the UpdateCommand affected 0
of the expected 1 records.
Can I turn of the built in concurrency check? I tried setting
DA.ContinueUpdateOnError = True, but that didn't work, it still fails due map
the parameter to the column.
Thanks
concurency issues, specifically if I have supplied I created my own update
command, instead of using the SqlCommandBuilder.
The issue I am facing is I have setup a column in my DataTable to map to an
output parameter in my (update) stored proc, using
DA.UpdateCommand.UpdatedRowSource = UpdateRowSource.OutputParameters to
achieve this. This works great until there is a concurrency issue. If the
DataAdapater determines there is a concurrency issue it just skips over this
row all together. This is a problem because internal to the stored procedure
I am doing my own concurrency checking and the output param indicates this.
i.e. 0 = no error, 1 = record updated since last read and 2 = record has been
deleted since last read.
Because of the built in concurrency error the output param doesn't map to
the row and I cannot determine the exact error. This built in concurrency
error is not specific enough for us.
A first chance exception of type 'System.Data.DBConcurrencyException'
occurred in System.Data.dll
Additional information: Concurrency violation: the UpdateCommand affected 0
of the expected 1 records.
Can I turn of the built in concurrency check? I tried setting
DA.ContinueUpdateOnError = True, but that didn't work, it still fails due map
the parameter to the column.
Thanks