473,480 Members | 1,887 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Combine results of two Dataset in memory

Hello All,
I have a dataset that I populate using a SQL Server database, and the
second one that I populate using a mySQL Server database, I need to combine
the results in memory and then sort them, how do I go about doing that ?
This is a search query, so I do not want to create another temp table to do
this, any idea's please.

Imran.
Feb 28 '06 #1
3 3101
I inherited a project that included a lot of this. Typically we might
create a third dataset
and populate it by iterating through the original two, taking the
values we needed.

We also had a module called DataSetHelper, which was probably found
somewhere on the web -- try googling for it. This provided a lot of
functionality (SelectDistinct,Min,Max).

I can't remember if sorting is available with the native
DataSet/DataTable.

Feb 28 '06 #2
For in-memory sorting and filtering, you could create a DataView from the
DataTable(s) in the DataSet and then do a DataView.Sort or DataView.RowFilter.

--
brians
http://www.limbertech.com

Feb 28 '06 #3
Thanks a lot for your response. I am now looking into the idea of creating a
new dataset in memory and merging the results from the other two dataset.

In addition since I am using ASP.net 2.0 I have come accross a Merge method
for Dataset that allows you to merge datasets but I get an error of
"<target>.nID and <source>.nID have conflicting properties:"

which I assume is based on the Merge taking the ID column as the primary key
hence trying to keep it unique, I will try to investige these possibilities
to sort this issue out. thanks a lot for your help.

Imran.

<jh*****@yahoo.com> wrote in message
news:11*********************@e56g2000cwe.googlegro ups.com...
I inherited a project that included a lot of this. Typically we might
create a third dataset
and populate it by iterating through the original two, taking the
values we needed.

We also had a module called DataSetHelper, which was probably found
somewhere on the web -- try googling for it. This provided a lot of
functionality (SelectDistinct,Min,Max).

I can't remember if sorting is available with the native
DataSet/DataTable.

Mar 1 '06 #4

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

Similar topics

3
2249
by: Benny | last post by:
Hi When I load a dataset with data obtained from a db, the dataset is stored in the memory of the client system. AFAIK the size of the dataset (which implicitly mean the number of rows that can be...
3
2215
by: Dev | last post by:
Good Morning to all, I have a bunch of XML files that need to be readed inside the same DataSet (each XML represent a single table). In the event of a large (some megabytes) file, what is the...
1
3526
by: Don | last post by:
I am new to Indexing Services, have been researching the MS Site as well as web articles on DevHood, etc. I have set up a seperate catalog ("KnowledgeBase") on Win XP with a number of files. I am...
2
1984
by: Lawrence Chang | last post by:
Hi My friends, Can I save dataset object to an application variable? I want all the customer use this dataset. and diffrent customer create diffrent dataview object from this dataset, so it...
1
1455
by: David Lozzi | last post by:
Hello, I'm looking for the best option to combine two XMLDocuments into a single document. I'm using ASP.Net using VB. I have a function that returns a dataset in XML which works great if there...
1
2789
by: Simon1234 | last post by:
Below you will see my code to read data from a database and store it into a dataset. The first, commented code uses an SQLDataReader and the second, uncommented code uses the Fill method of the...
4
1610
by: jaYPee | last post by:
I have downloaded some source code but I want this to convert the results into datagrid. dr = cmd.ExecuteReader() '**************************************** ' SHOW THE RESULTS...
1
1422
by: Roy | last post by:
No errors here, I'm just looking for ways to make my code more efficient. As the subject line suggests, I have a LOT of repeaters on a certain page. They are visible or hidden depending on user...
3
2818
by: Ken Fine | last post by:
This is a question that someone familiar with ASP.NET and ADO.NET DataSets and DataTables should be able to answer fairly easily. The basic question is how I can efficiently match data from one...
0
6904
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
7076
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...
1
6730
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...
0
5321
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
4471
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...
0
2990
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...
0
2976
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
174
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.