473,699 Members | 2,564 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 OracleDataAdapt er("Select * from view1");
cmd.Tablemappin gs.Add("Table", "Views");
cmd = new OracleDataAdapt er("Select * from view2");
cmd.Tablemappin gs.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 2878
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 OracleDataAdapt er("Select * from view1");
cmd.Tablemappin gs.Add("Table", "Views");

cmd = new OracleDataAdapt er("Select * from view2");
cmd.Tablemappin gs.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(t able) 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******** *************** ***********@a70 g2000hsh.google groups.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 OracleDataAdapt er("Select * from view1");
cmd.Tablemappin gs.Add("Table", "Views");
cmd = new OracleDataAdapt er("Select * from view2");
cmd.Tablemappin gs.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
3139
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 SqlConnection("Data Source=SWC_K7\\CHRISMON1;User
5
2952
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 all the rows of ds1 to an existing table in an SQL Server database. I know I can do things like looping through the dataset and issuing Update SQL statements to do this but I suspect there is a better
15
2243
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
1275
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 file so that it can be easily opened up in Excel or emailed on. Is there any simple way of doing this, or do I have to write code to scan through the dataset and write it out line by line to a csv file?
4
7216
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 (myDataTable.Columns.Count <> 0) Then For Each column As DataColumn In myDataTable.Columns sb.Append(column.ColumnName & ",")
4
1796
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( strXMLFileName ); sw.WriteLine(@"<?xml version='1.0'?>"); sw.WriteLine(@"<Results>");
3
1745
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 such: Dim strRdr As StringReader strRdr = New StringReader(DS.Tables(0).Rows(0)("xml").ToString)
4
1969
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 get to the correct DataSet values. <?xml version="1.0" encoding="utf-8" ?> <TestSample> <TRs> <TR1>
4
9411
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 halts the program. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= WebClient client = new WebClient(); string url="<url of the api>"; Stream data = client.OpenRead(url);
0
8691
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, 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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8620
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9038
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8887
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6536
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5877
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4378
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3060
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
3
2012
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.