473,320 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

DataSet append

Hi,

I have one dataset which is exported to an external file (excel)
My problem is that I want to append the data of two different views to
one dataset. (because they have to be displayed in an sheet among each
other)
Something like:

cmd = new OracleDataAdapter("Select * from view1");
cmd.Tablemappings.Add("Table", "Views");
cmd = new OracleDataAdapter("Select * from view2");
cmd.Tablemappings.Add("Table", "Views"); -- append to first table

cmd.Fill(ds, "Views");
Is there a way to do something like that?

Thank you very much in advance.

regards,

Sebastian
Apr 7 '08 #1
2 2851
On Apr 7, 11:06 am, SePp <C_o_z_...@gmx.dewrote:
Hi,

I have one dataset which is exported to an external file (excel)
My problem is that I want to append the data of two different views to
one dataset. (because they have to be displayed in an sheet among each
other)
Something like:

cmd = new OracleDataAdapter("Select * from view1");
cmd.Tablemappings.Add("Table", "Views");

cmd = new OracleDataAdapter("Select * from view2");
cmd.Tablemappings.Add("Table", "Views"); -- append to first table

cmd.Fill(ds, "Views");

Is there a way to do something like that?

Thank you very much in advance.

regards,

Sebastian
Okay found a way in sql ....

select * from view1 union (all) select * from view2

cheers
sebastian
Apr 7 '08 #2
Sepp,

The DataSet.Merge(table) will merge every datatable inside a dataset.
(be aware that it is only the reference of course)

Cor

"SePp" <C_*******@gmx.deschreef in bericht
news:27**********************************@a70g2000 hsh.googlegroups.com...
Hi,

I have one dataset which is exported to an external file (excel)
My problem is that I want to append the data of two different views to
one dataset. (because they have to be displayed in an sheet among each
other)
Something like:

cmd = new OracleDataAdapter("Select * from view1");
cmd.Tablemappings.Add("Table", "Views");
cmd = new OracleDataAdapter("Select * from view2");
cmd.Tablemappings.Add("Table", "Views"); -- append to first table

cmd.Fill(ds, "Views");
Is there a way to do something like that?

Thank you very much in advance.

regards,

Sebastian

Apr 7 '08 #3

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

Similar topics

5
by: Steven C | last post by:
Hello: I am trying to append a dataset that draws its data from a MSDE instance, and I keep getting the exception: Can't create a child list for field tblCustomers. conn = new...
5
by: Wayne Wengert | last post by:
I am using VB ASP.NET. In my page I convert an uploaded XML file to a dataset as follows: Dim ds1 As DataSet = New DataSet ds1.ReadXml(strPathName, XmlReadMode.Auto) Now I want to append...
15
by: JIM.H. | last post by:
Hello, Can I send a dataset as a parameter into stored procedure and import data to a table in the stored procedure? Thanks, Jim.
2
by: Simon Verona | last post by:
Hi, This must be simple (I hope)! I've tried a google search but can't seem to find what I want (probably using the wrong search keys!) I'm trying to simply save a complete dataset as a CSV...
4
by: BrianDH | last post by:
Hi Looking for a fast way to convert a Dataset from a web service into a "filename.csv" file. Right now I am looping thur the dataset. /// Dim myDataTable As DataTable = ds.Tables(0) If...
4
by: Brian Parker | last post by:
Here's a snippet of code I have: ============================================== DataSet ds = new DataSet(); string strXMLFileName = Path.GetTempFileName(); StreamWriter sw = File.AppendText(...
3
by: darrel | last post by:
I'm grabbing an XML string from a database and trying to pass it into a dataset. I've read this article: http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=213 and have tried to implement it as...
4
by: SteveT | last post by:
I am wanting to populate several treeviews, one for the <TRs> group and one for the <TGsgroup. Is there a simplier way to populate the Treeview than the one I did below? It seems difficult to...
4
by: Brad | last post by:
I am trying to convert an XML Stream received from a web api call into a DataSet to use in the rest of the app. The issue I am running into is that it will not convert the stream to a dataset and...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.