Sahil
Mon Nov 28 21:22:47 CST 2005
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.malik/archive/2005/05/13/63199.aspx
----------------------------------------------------------------------------
"Ali" <Ali@discussions.microsoft.com> wrote in message
news:E57C4418-2B13-491F-A1DB-84E357F64DA6@microsoft.com...
> 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/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatadataviewclassfindtopic.asp
>>
>> I hope this helps,
>>
>> Cor
>>
>>
>>