Re: Retrieving a value from the database by Neil
Neil
Tue Aug 19 14:42:13 CDT 2003
I've been trying exactly the same thing, and the answer appears to be NO (a
step backwards relative to ADO 2.x). The Wrox Press book on Programming
ADO.Net appears to confirm this.
Even if you set the SqlCommand.UpdatedRowSource to update the row following
the operation, it appears that the database is queried but the data
discarded because of the conflict which occurred on that row. It seems to
me that it would have been fairly simple to use that information to provide
an additional row version (e.g. UnderlyingValue) as per ADO2.x, but no such
row version exists.
NB the DataRow.GetColumnsInError method also doesn't appear to work,
probably because of the same thing - i.e that ADO.Net doesn't look at the
current data in the database to identify which columns are in error.
Regards,
Neil McKechnie
"Tom Archer" <tarcher@mindspring.com> wrote in message
news:066901c365e8$6bc77e40$a401280a@phx.gbl...
> When handling a concurrency conflict, is there a way to
> get the value currently in the database without having to
> manually create a command object?
>
> Someone here pointed to the MS site where they have
> a "walkthrough" on handling concurrency issues. However,
> their demo uses two datasets in one app with the code
> simultaneously accessing both! Unfortunately, this doesn't
> represent a realistic scenario where the client is running
> on multiple machines (and not in the same app).