473,461 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

dataset merge

Hello,
I'm trying to merge two datsets which both have a
common keyed column, and getting nowhere. Do I want to
use the keyed column or not? I'm using the following and
have tried all the constraints every which way.

Dataset1.Merge(Dataset2)

Can anyone shed some light on merging, I thought it was
going to be simple, but there I go thinking again.
Thanks
..
Nov 20 '05 #1
7 2187
Cor
Hi Nitromuse,

As far as I did it, you need for merging absolute the same scheme,
(So the same key)

And the keys need to be absolute unique in both datasets (the same in
datasetB and datasetB is not allowed)

I am not sure of this, but I thought you can use the merge for 2 different
tables, but than it is almost the same as an add of a table to the dataset.

A very curious situation to use I think.

What it it you want to archieve?

Cor
"> Hello,
I'm trying to merge two datsets which both have a
common keyed column, and getting nowhere. Do I want to
use the keyed column or not? I'm using the following and
have tried all the constraints every which way.

Dataset1.Merge(Dataset2)

Can anyone shed some light on merging, I thought it was
going to be simple, but there I go thinking again.
Thanks
.

Nov 20 '05 #2
Please go to the adonet newsgroup for this. It could be answered here, but
you are more likely to get a quick response there as that is where your
question should be.

Regards - OHM
Nitromuse wrote:
Hello,
I'm trying to merge two datsets which both have a
common keyed column, and getting nowhere. Do I want to
use the keyed column or not? I'm using the following and
have tried all the constraints every which way.

Dataset1.Merge(Dataset2)

Can anyone shed some light on merging, I thought it was
going to be simple, but there I go thinking again.
Thanks
.


Regards - OHM# OneHandedMan{at}BTInternet{dot}com
Nov 20 '05 #3
Nitromuse,
As Cor stated the schema's in both datasets need to be the same.

My understanding is: Each DataSet needs at least one Table that has the same
name in both DataSets. That these tables have to have matching columns
(names, types, sizes) in both DataSets. That the Table has the same
PrimaryKey in both DataSets. That the dataset you are merging from needs
pending changes where as the dataset you are merging to it doesn't matter.

Where dsChanges are the changes you want added to dsMain, such as:

Dim dsChanges As DataSet
Dim dsMain As DataSet
dsMain.Merge(dsChanges)

In addition to OHM's suggestion of the ado.net newsgroup. David Sceppa's
book "Microsoft ADO.NET - Core Reference" from MS Press has a section on
using the Merge method. Also I find David's book to be both a good tutorial
to learn ADO.NET plus a good desk reference once you are using ADO.NET.

Hope this helps
Jay

"Nitromuse" <an*******@discussions.microsoft.com> wrote in message
news:00****************************@phx.gbl...
Hello,
I'm trying to merge two datsets which both have a
common keyed column, and getting nowhere. Do I want to
use the keyed column or not? I'm using the following and
have tried all the constraints every which way.

Dataset1.Merge(Dataset2)

Can anyone shed some light on merging, I thought it was
going to be simple, but there I go thinking again.
Thanks
.

Nov 20 '05 #4
Please give me the URL for ADONET, Ill try them there,
thanx
-----Original Message-----
Please go to the adonet newsgroup for this. It could be answered here, butyou are more likely to get a quick response there as that is where yourquestion should be.

Regards - OHM
Nitromuse wrote:
Hello,
I'm trying to merge two datsets which both have a
common keyed column, and getting nowhere. Do I want to
use the keyed column or not? I'm using the following and have tried all the constraints every which way.

Dataset1.Merge(Dataset2)

Can anyone shed some light on merging, I thought it was
going to be simple, but there I go thinking again.
Thanks
.


Regards - OHM# OneHandedMan{at}BTInternet{dot}com
.

Nov 20 '05 #5
microsoft.public.dotnet.framework.adonet


NitroM.... wrote:
Please give me the URL for ADONET, Ill try them there,
thanx
-----Original Message-----
Please go to the adonet newsgroup for this. It could be answered
here, but you are more likely to get a quick response there as that
is where your question should be.

Regards - OHM
Nitromuse wrote:
Hello,
I'm trying to merge two datsets which both have a
common keyed column, and getting nowhere. Do I want to
use the keyed column or not? I'm using the following and
have tried all the constraints every which way.

Dataset1.Merge(Dataset2)

Can anyone shed some light on merging, I thought it was
going to be simple, but there I go thinking again.
Thanks
.


Regards - OHM# OneHandedMan{at}BTInternet{dot}com
.


Regards - OHM# OneHandedMan{at}BTInternet{dot}com
Nov 20 '05 #6
"NitroM...." <an*******@discussions.microsoft.com> schrieb
Please give me the URL for ADONET, Ill try them there,
thanx


In addition to OHM, if you want to read the docs:

<F1>
VS.NET
.NET Framework
Programming with .NET FRamework
Accessing data with ADO.NET

especially:
Creating and using datasets
Merging dataset contents
I do not know whether your question will be answered there but you can have
a look.

There is also
<F1>
VS.NET
VB and VC#
Accessing data
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #7


Paul_IV
Please notice that merged Datasets have to be instances of the same
Dataset Class. In solution explorer Dataset class has extension .xsd. In
Sub it has to look something like:
Public Sub UpdateDataSet()

Dim DataSetInstance1 as DataSet_Name = New Dataset_Name
Dim DataSetInstance2 as DataSet_Name = New Dataset_Name

DataSetInstance1.Merge(DataSetInstance2)
DataSetInstance1.AcceptChanges()

End Sub

Let Data Form Wizard to generate code for you and you will see all right
syntax over there.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Bruce Stockwell | last post by:
the setup: Webservice/WinClient application/SQL server. VS.Net (visual basic) winform wizard creates a simple form with load cancel cancelall and datagrid bound to a simple Dataset with one...
3
by: Li Weng | last post by:
Hi, I have an original dataset. It is copied to 2 different forms. Each form adds a new row to the same table in that dataset. When I merge these 2 dataset back to original one, the 2 new rows...
2
by: Mike Stephens | last post by:
A contact management application we previously developed for a customer now has a requirement to perform mail merging. Normally request like this would be very simple to solve, we were just point...
2
by: muntyanu | last post by:
Hi all, I have problem when merging existing DataTable into new dataset. DataSet ds = new DataSet(); while ( done ) { // fill myCustomDataSet.MyTable with data ds.Merge(...
4
by: Al | last post by:
I have this scenario: 1. XML file with schema and data is created from SQL Server tables. XML file contains 6 tables, some of them have rows, some of them are empty. 2. XML file is given to the...
1
by: matt | last post by:
hello, i have a web app that allows users to query our oracle db and produce a dataset of report data. they then have the option to serialize this data and store it in the database. later, then...
5
by: Mark Chambers | last post by:
Hi there, Can anyone explain the following (very) simple scenario. 1) I make an exact copy of my "DataSet" and delete one record from a given table (in the copy) 2) I invoke...
5
by: Franck | last post by:
how come unchanged always true even if data changed This code come from my saving button: ============================================ DataSet ds1 = new DataSet(); DataSet ds2 = new...
2
by: Neil Chambers | last post by:
I am trying to get my head around dataset merging but despite a little research I could still use a pointer (or ten). Basically I want to perform an outer join operation on a dataset (created from...
1
by: joproulx | last post by:
Hello all, Here is my problem: I am trying to merge 2 datasets but I don't want to overwrite rows that are already modified in my working dataset. Example: I have one Dataset with only one...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.