Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get original value from dataset?
Message
From
23/01/2010 20:54:58
 
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01445609
Message ID:
01445679
Views:
47
Hi Dmitry,

Viv gave you the answer to your first question (original value), but your second question was "does GetChanges() make a trip back to the database". The answer to that is a resounding NO. DataSets inherently know nothing (or at least should know nothing) about where the data came from. Could be from a database, might not be too ... DataSet shouldn't know nor care. The exception to this rule nowadays is that damn TableAdapter ... but, everyone by now should know how I feel about those stupid things. <g> And there's absolutely no reason to use them anyway, so the "separation of DataSet and datbase" is still considered "best practice" as far as I'm concerned. =0)

~~Bonnie




>Hi,
>
>I have read somewhere that a data set contains both the current (if changed) and old (original) value for each column in a table. But I am not sure if this is so since I can't seem to find a way to get the original value in code from a data set. Is it possible to get original value of a column from data set in code?
>
>I know that GetChanges() method will create a new data set of changed values. But I am wondering if GetChanges() makes a trip back to the database or gets the values right from the data set.
>
>Does anybody know?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform