Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Do You Check For Dirty Field?
Message
From
04/05/2007 10:26:17
John Baird
Coatesville, Pennsylvania, United States
 
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
01222469
Message ID:
01222494
Views:
24
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?
Previous
Reply
Map
View

Click here to load this message in the networking platform