Dear All,
Now i have a two dataset. they have same db structure and same columns and
same rows.
just the content is not same between them.
for example:
datagrid 1:
name,sex,order_ quality
shenzhen benny,male,1000
shanghai allen,male,2000
hangzhou kevin,male,3000
datagrid 2:
name,sex,order_ quality
shenzhen dragon,male,100 0
shanghai leo,male,2000
hangzhou james,male,3000
sturcture is sames as the datagrid1.
now i want to merge them into one datagrid. how to do it? (i can't used
ado's Merge command, because it's not full fill my requirement).
i want the combination of these two grids into:
name,sex,order_ quality,name1,s ex1,order_quali ty1
shenzhen benny,male,1000 ,dragon,male,10 00
shanghai allen,male,2000 ,leo,male,2000
hangzhou kevin,male,3000 ,james,male,300 0
how to do it for the combination of the above?
because the Merge command is only for the data merger for vertical. not
for the horizontal. Now i must to used two for...loop...to finish this
requirement.
But I thinking whether i can get an easily ways to finish that. How is yor
suggestion?
Thanks,
Benny Ng 2 1293
When you do your query, simply change the names at that time for the 2nd
dataset, i.e., Select Name as Name1, Sex as Sex1, Order_Quality as
Order_Quality1. When you do your merge, since the columns are not identical,
the merge will be "horizontal " instead of vertical.
"Benny Ng" <be**********@h otmail.comwrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
Dear All,
Now i have a two dataset. they have same db structure and same columns
and
same rows.
just the content is not same between them.
for example:
datagrid 1:
name,sex,order_ quality
shenzhen benny,male,1000
shanghai allen,male,2000
hangzhou kevin,male,3000
datagrid 2:
name,sex,order_ quality
shenzhen dragon,male,100 0
shanghai leo,male,2000
hangzhou james,male,3000
sturcture is sames as the datagrid1.
now i want to merge them into one datagrid. how to do it? (i can't used
ado's Merge command, because it's not full fill my requirement).
i want the combination of these two grids into:
name,sex,order_ quality,name1,s ex1,order_quali ty1
shenzhen benny,male,1000 ,dragon,male,10 00
shanghai allen,male,2000 ,leo,male,2000
hangzhou kevin,male,3000 ,james,male,300 0
how to do it for the combination of the above?
because the Merge command is only for the data merger for vertical. not
for the horizontal. Now i must to used two for...loop...to finish this
requirement.
But I thinking whether i can get an easily ways to finish that. How is
yor
suggestion?
Thanks,
Benny Ng
Thanks,Earl,
I think it's can be useful to me. But for me. Actually i need to used
execute two stored procedure to make it. (this two stored procedures is same
only the parameters is different.)
I'm still thinking.
Benny Ng
"Earl" <br******@newsg roups.nospamwro te in message
news:u9******** ******@TK2MSFTN GP04.phx.gbl...
When you do your query, simply change the names at that time for the 2nd
dataset, i.e., Select Name as Name1, Sex as Sex1, Order_Quality as
Order_Quality1. When you do your merge, since the columns are not
identical, the merge will be "horizontal " instead of vertical.
"Benny Ng" <be**********@h otmail.comwrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
>Dear All,
Now i have a two dataset. they have same db structure and same columns and same rows.
just the content is not same between them.
for example:
datagrid 1:
name,sex,order_ quality shenzhen benny,male,1000 shanghai allen,male,2000 hangzhou kevin,male,3000
datagrid 2: name,sex,order_ quality shenzhen dragon,male,100 0 shanghai leo,male,2000 hangzhou james,male,3000
sturcture is sames as the datagrid1.
now i want to merge them into one datagrid. how to do it? (i can't used ado's Merge command, because it's not full fill my requirement).
i want the combination of these two grids into:
name,sex,order_ quality,name1,s ex1,order_quali ty1 shenzhen benny,male,1000 ,dragon,male,10 00 shanghai allen,male,2000 ,leo,male,2000 hangzhou kevin,male,3000 ,james,male,300 0
how to do it for the combination of the above?
because the Merge command is only for the data merger for vertical. not for the horizontal. Now i must to used two for...loop...to finish this requirement.
But I thinking whether i can get an easily ways to finish that. How is yor suggestion?
Thanks,
Benny Ng This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jeff Brown |
last post by:
OK i removed all of my datasets to start fromo scratch again with another
method.
Is there a way i can create all my datasets in the MDI Parent form and
reference them from child forms
*******************
for instance i just created dsName1 in the MDi Parent and the dsName.xsd was
created in the solution.
Now i want 2 different child...
|
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 person with Pocket PC.
3. XML file is used to populate DataSet on the Pocket PC.
4. User adds new rows, changes values, deletes some rows.
5. Altered...
|
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 person with Pocket PC.
3. XML file is used to populate DataSet on the Pocket PC.
4. User adds new rows, changes values, deletes some rows.
5. Altered...
|
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 DataSet();
DataSet ds3 = new DataSet();
//Static Dataset which contain values when my form load
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |