Hi. I'm comparing a temporary table to an another table, to check for changes in the cells. The way I'm doing it, is that I'm using three loops; one to loop trough the temporary, one to loop trough the other table and a last one to loop trough each column. Here's the code:
vb.net Code:
  1. For Each row As DataRowView In View
  2.                     For Each drow As DataRowView In view2
  3.                         If row("emitid") = drow("emitid") Then
  4.                             For Each column As DataColumn In View.Table.Columns
  5.                                 If Not row(column.ToString) = drow(column.ToString) Then
  6.                                     row(column.ToString) = drow(column.ToString)
  7.                                 End If
  8.                             Next
  9.                             Exit For
  10.                         End If
  11.                     Next
  12.                 Next

"emitid" is the column I use as a reference to be sure that I'm comparing the correct rows, and the column order will always be the same in both tables. Is this the best way of doing what I want? I feel it looks a bit complicated...