PC Review


Reply
Thread Tools Rate Thread

combining datasets

 
 
soni2926@yahoo.com
Guest
Posts: n/a
 
      18th Jul 2007
Hi,
I have 2 datasets right now, say with the following structure:
DataSet 1 has a row called ItemCode, index 1
DataSet 2 has a row called ItemCode, index 1

both are similar, but i need to merge them to make one dataset, which
needs to have everything in DataSet1 plus anything from DataSet2
that's not in DataSet1 already. I'm not too familiar with working
with Datasets, i know theres suppose to be a way to join them, can
someone help out? Both have a ItemCode which is what needs to be used
to make sure no duplicates from DataSet2 get into DataSet1.

Thanks.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWFuaXNoIEJhZm5h?=
Guest
Posts: n/a
 
      19th Jul 2007
Hi,
Try this code for example:
customers.Merge(orders, True, MissingSchemaAction.AddWithKey)
What you need to take care is there must be primary defined in backend
database(in your case it is itemcode).Also names of tables you are merging in
the dataset must be same.If you take care of this then above code merge
dataset as if join has been done between two tables in dataset
--
Hope this helps.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.



"(E-Mail Removed)" wrote:

> Hi,
> I have 2 datasets right now, say with the following structure:
> DataSet 1 has a row called ItemCode, index 1
> DataSet 2 has a row called ItemCode, index 1
>
> both are similar, but i need to merge them to make one dataset, which
> needs to have everything in DataSet1 plus anything from DataSet2
> that's not in DataSet1 already. I'm not too familiar with working
> with Datasets, i know theres suppose to be a way to join them, can
> someone help out? Both have a ItemCode which is what needs to be used
> to make sure no duplicates from DataSet2 get into DataSet1.
>
> Thanks.
>
>

 
Reply With Quote
 
Angela Gerber
Guest
Posts: n/a
 
      11th Nov 2008
Thank- you. This is a great help!!
 
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
Combining and relating DataTables from different typed DataSets in =?Utf-8?B?TWFyYyBXb29sZnNvbg==?= Microsoft ADO .NET 1 4th Oct 2007 05:12 AM
Combining Datasets robin9876@hotmail.com Microsoft Dot NET 0 12th Jan 2007 04:56 PM
How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class? news.microsoft.com Microsoft ASP .NET 0 12th Apr 2006 10:07 AM
Converting Untyped Datasets into Strongly Typed Datasets with Foreign Key Constraints. Alex Berryhill Microsoft ADO .NET 2 19th Mar 2004 02:20 AM
Combining Datasets Julio Sarmiento Microsoft ASP .NET 0 18th Jan 2004 07:28 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:34 PM.