Groups | Blog | Home
all groups > dotnet ado.net > october 2007 >

dotnet ado.net : DAtaset comparision ??


calderara
10/27/2007 2:41:00 AM
Dear all,

What is the best way to compare 2 dataset ?

What I mean by that is not comparing that its teh same object but allso that
rows data values in both .
In other words I need an effeective way which tells me if records between 2
dataset are the same or different

thnaks for help
regards
Mansi Shah
10/27/2007 3:55:48 AM

Hi calderara,

Following link may help you:

http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.ado
net/topic4082.aspx

Then after you have any queries then feel free to ask..

Regards,
Mansi Shah.

Cor Ligthert[MVP]
10/27/2007 7:19:02 PM
Caldera,

A non serialized dataset is in fact nothing more then a wrapper that holds
in opbjects nothing more than references to datatables and datarelations.

DataTables holds references to datacolumns and datarows.

DataRows hold references to items, and items contains data.

If you want to check this, then it will be a loop in a loop etc. However
completely depending what is in the dataset.

In my opinion are you mixing up a dataset with a recordset, while you are
speaking of records. A dataset is completely different from a dataset, the
dataset is not even a resultset.

Cor



calderara
10/28/2007 11:16:00 AM
All right I understand cleary what a dataset is..
Lets keep it simple, I just would like to know if there is straigh forwars
solution to compare items in rows between 2 different rows colelction in
order to know if tehre are equal.



[quoted text, click to view]
Cor Ligthert[MVP]
10/29/2007 12:00:00 AM
Caldera,

As I wrote already in a (for) loop.

You wrote that you want the compare the contents of objects, those are in
the DataRow Item Collection.

Cor
AddThis Social Bookmark Button