Ali,
Do something like this --
ds2.AcceptChanges
ds2.Merge(ds1,true)
ds2.GetChanges
You will however have to specify schemas on all these datasets, and if you
are workign with multiple tables - you will need to get rid of relatioships
or GetChanges may include unchanged rows as well (to maintain relational
sanctity)
HTH
--
- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
----------------------------------------------------------------------------
"Ali" <(E-Mail Removed)> wrote in message
news:E57C4418-2B13-491F-A1DB-(E-Mail Removed)...
> Dear Cor,
> Thanx for your quick response.
>
> I just need to know if all the values in ds1 ( retrieved from Excel Sheet)
> exist in ds2 ( retrieved from SQL Employees table). if not, return the
> non-existing employees and add them into ds3 and view it in datagridview.
>
> your example doesn't look work for me.. If so, can u give me an example of
> how to use it???
>
> Thanx
> "Cor Ligthert [MVP]" wrote:
>
>> Ali,
>>
>> You can use two kind of procedures.
>>
>> The classic loop and access than both tables sequential.
>>
>> Or just use the dataview.find to get the number in a for each loop from
>> the
>> searching table in the table to search (what I prefer). If you don't find
>> it
>> than you have to add the row of the searcher in the extra table.
>>
>> http://msdn.microsoft.com/library/de...sfindtopic.asp
>>
>> I hope this helps,
>>
>> Cor
>>
>>
>>