if (!dataSet1.HasChanges()) return; DataSet ds = dataSet1.GetChanges(); foreach (DataTable tbl in ds.Tables) { foreach (DataRow dr in tbl.Rows) { for (int i=0; i < tbl.Columns.Count; i++) { if (dr[i, DataRowVersion.Current] != null && !dr[i, DataRowVersion.Current].Equals(dr[i, DataRowVersion.Original])) textBox1.AppendText(tbl.TableName + "." + tbl.Columns[i].ColumnName + " changed (" + dr[i, DataRowVersion.Original] + " -> " + dr[i, DataRowVersion.Current] + ")" + Environment.NewLine); } } }
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.