Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > dotnet ado.net > february 2006 >

dotnet ado.net : OleDBDataAdapter update and getting original DB values


Mark Atkinson
2/28/2006 11:22:28 AM
After update some modified data using an OleDBDataAdapter's Update method, if
there are concurrency exceptions, is there any way to get at the values that
are currently in the database without having to do another trip to the
database or calling OleDBDataAdapter.Fill?
I thought that having the adapter's Update command's UpdateRowSource enum
set to Both would return the current (in DB) values in the dataset but the
dataset only ever seems to have the Original (in the dataset) and Curent
Usenet User
3/1/2006 10:22:19 AM
On Tue, 28 Feb 2006 11:22:28 -0800, "Mark Atkinson"
[quoted text, click to view]

Mark,

Think of it this way: an UPDATE SQL statement does exactly that -
updates the data, but does not return it. So, if you got a concurrency
violation during an update, you'll need to execute a SELECT
subsequently in order to retrieve the most current data. Obviously,
your DataAdpater won't do it for you by default, simply because of the
risk of losing your Original data in the dataset. If you're to
override this, you'll need to execute a Fill after a concurrency
AddThis Social Bookmark Button