compring two datasets

  • Thread starter Thread starter Sylesh Nair
  • Start date Start date
S

Sylesh Nair

How can I compare the values in two different datasets ?
If I transform the datasets into two different XML files ... Can I do the
same ?
I find problem .. cos the Nodes for both the XML files are different .

Can anyone help ???

Thanks
Sylesh Nair
 
Sylesh,

You are probably better off doing a comparison of the object models in
the data set. What you can do is basically check the following to see if
two data sets are equal (I tried to order them in such a way to see what is
most performant):

- Check to see that the number of tables in each dataset are the same.
- Check to see see that the number of rows are the same in each table in the
data set.
- Check to see that each table has the same number of columns.
- Make sure that each column name for each table in the first data set
matches a column with the same table, name and type in the second.
- Cycle through each row, and each column in each row, and make sure the
values are the same.

Only if all of those conditions are satisfied can the datasets be
different.

Also, if you want to go the XML route, you can use an XML diff utility
(if there is one out there, I do not know) to check to see if the XML is the
same for both.

Hope this helps.
 
Back
Top