Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How Do You Check For Dirty Field?
Message
De
04/05/2007 10:26:17
John Baird
Coatesville, Pennsylvanie, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
01222469
Message ID:
01222494
Vues:
20
This message has been marked as the solution to the initial question of the thread.
Off the top of my head:
Create an List changed = new List();

Then:
for(Int32 rowNum=0; rowNum < myDataSet.Tables[0].Rows.Count; rowNum++)

{
if(!(myDataSet.Tables[0].Rows[rowNum]["ColName",DataRowVersion.Default].Equals(myDataSet.Tables[0].Rows[rowNum]["ColName",DataRowVersion.Original]))
{
    // flag
    changed.Add(true);
}
Then you can foreach through the list and take action on the column indicated where the boolean value is true.


>Is there a way to find out if a field is dirty (AKA New/Changed Data)? I am able to check of the Row has changes....which is great....but I need to know which specific fields changed... Anyone know how to do this?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform