DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Wed, 18 Jul 2007 13:33:17 -0700,    posted on: microsoft.public.dotnet.framework.adonet        back       

Thread Index
  1    unknown
          2    Manish Bafna


combining datasets   
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.
Date:Wed, 18 Jul 2007 13:33:17 -0700   Author:  

RE: combining datasets   
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.



"soni2926@yahoo.com" 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.
> 
> 
Date:Thu, 19 Jul 2007 05:04:04 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us