Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get original value from dataset?
Message
De
23/01/2010 22:51:53
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
 
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01445609
Message ID:
01445692
Vues:
38
I have TableAdapters in a headlock right now.... He's a wily one...

>Hi Bonnie,
>
>Thank you for clarifying how GetChanges() works. This is a good thing that there is no trip back to the server.
>
>As far as TableAdapter. I have read so much bad you wrote about it that if I ever run across it, I will blacken his eye (TableAdapter is him, right?) :).
>
>>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?
Very fitting: http://xkcd.com/386/
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform