PC Review


Reply
Thread Tools Rate Thread

Dataset and Datamerge

 
 
srini
Guest
Posts: n/a
 
      20th Jul 2006
I am trying to find difference between two tables from two different
datasources using dataset concepts. I need to update one of the table
if there is a difference in values of the columns and insert new row if
there is no match. To keep it simple, please assume the schema is same.

I have one dataset Dataset A from a legacy db as the source and have
another dataset B with a new db as the source. The dataset A and
dataset B has the same schema. I need
to get only the changes in A to be sent over to B. So I was trying to
do a merge having dataset B as target. Note: I have created a primary
key on both dataset. The merge brings the new rows from A over to B,
but it makes the other rows which are same as modified.
I used the haschanges method on the dataset B to see the results.
So I ended up looping through each datarow from dataset A, and then
query against the primray key for dataset B, then checking each column,
to see if there are changes. and if no rows present, ended up
inserting.

Can anyone confirm if the dataset merge behaviour works like above ?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to cast object of type 'System.Data.DataSet' to Typed DataSet Optimus Microsoft VB .NET 1 31st Jan 2006 06:26 AM
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft Dot NET Framework 3 31st Oct 2003 01:05 PM
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ASP .NET 2 31st Oct 2003 01:05 PM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft C# .NET 1 31st Oct 2003 02:39 AM
webservice class inherite DataSet and client generate the force dataset issues miller chen Microsoft C# .NET 0 18th Jul 2003 09:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:55 AM.