473,399 Members | 3,832 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,399 software developers and data experts.

Put a DataTable at the beginning of a DataSet

Hi,

I have a DataSet, which contains several DataTables. I want to put a new
DataTable in it (tblFileSettings) just before I write this DataSet to an
XML-file.

But what I want is that this new DataTable tblFileSettings is the first
DataTable in the XML-file. So If uses open the XML file, they see this
DataTable (which contains some info about the file).

Does anybody knows how to do this? The problem is that I can't insert this
DataTable before I insert all the others, because of the fact that the data
in my tblFileSettings depends on the other DataTables...

Any help would be really appreciated!!

Tanksa lot,

Pieter
Jul 22 '05 #1
5 1216
Hi,

I dont see anyway to control where a datatable is added to a
dataset. Maybe you could create a 2nd dataset and add the tables to it in
the order you want.

Ken
-----------------
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:eq*************@TK2MSFTNGP15.phx.gbl...
Hi,

I have a DataSet, which contains several DataTables. I want to put a new
DataTable in it (tblFileSettings) just before I write this DataSet to an
XML-file.

But what I want is that this new DataTable tblFileSettings is the first
DataTable in the XML-file. So If uses open the XML file, they see this
DataTable (which contains some info about the file).

Does anybody knows how to do this? The problem is that I can't insert this
DataTable before I insert all the others, because of the fact that the data
in my tblFileSettings depends on the other DataTables...

Any help would be really appreciated!!

Tanksa lot,

Pieter

Jul 22 '05 #2
Or write dataset's xml to a stream and modify it "manually".

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
SLODUG - Slovene Developer Users Group www.codezone-si.info

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi,

I dont see anyway to control where a datatable is added to a
dataset. Maybe you could create a 2nd dataset and add the tables to it in
the order you want.

Ken
-----------------
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:eq*************@TK2MSFTNGP15.phx.gbl...
Hi,

I have a DataSet, which contains several DataTables. I want to put a new
DataTable in it (tblFileSettings) just before I write this DataSet to an
XML-file.

But what I want is that this new DataTable tblFileSettings is the first
DataTable in the XML-file. So If uses open the XML file, they see this
DataTable (which contains some info about the file).

Does anybody knows how to do this? The problem is that I can't insert this
DataTable before I insert all the others, because of the fact that the
data
in my tblFileSettings depends on the other DataTables...

Any help would be really appreciated!!

Tanksa lot,

Pieter

Jul 22 '05 #3
How about creating a new DataSet and assembling it in the order in which you
wish the data to appear?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

"DraguVaso" <pi**********@hotmail.com> wrote in message
news:eq*************@TK2MSFTNGP15.phx.gbl...
Hi,

I have a DataSet, which contains several DataTables. I want to put a new
DataTable in it (tblFileSettings) just before I write this DataSet to an
XML-file.

But what I want is that this new DataTable tblFileSettings is the first
DataTable in the XML-file. So If uses open the XML file, they see this
DataTable (which contains some info about the file).

Does anybody knows how to do this? The problem is that I can't insert this
DataTable before I insert all the others, because of the fact that the
data
in my tblFileSettings depends on the other DataTables...

Any help would be really appreciated!!

Tanksa lot,

Pieter

Jul 22 '05 #4
What about exporting each table to xml individually? You can set up the xml
the way that you like it too :)
"DraguVaso" wrote:
Hi,

I have a DataSet, which contains several DataTables. I want to put a new
DataTable in it (tblFileSettings) just before I write this DataSet to an
XML-file.

But what I want is that this new DataTable tblFileSettings is the first
DataTable in the XML-file. So If uses open the XML file, they see this
DataTable (which contains some info about the file).

Does anybody knows how to do this? The problem is that I can't insert this
DataTable before I insert all the others, because of the fact that the data
in my tblFileSettings depends on the other DataTables...

Any help would be really appreciated!!

Tanksa lot,

Pieter

Jul 22 '05 #5
ok, thanks for the answers! :-)

"DraguVaso" <pi**********@hotmail.com> wrote in message
news:eq*************@TK2MSFTNGP15.phx.gbl...
Hi,

I have a DataSet, which contains several DataTables. I want to put a new
DataTable in it (tblFileSettings) just before I write this DataSet to an
XML-file.

But what I want is that this new DataTable tblFileSettings is the first
DataTable in the XML-file. So If uses open the XML file, they see this
DataTable (which contains some info about the file).

Does anybody knows how to do this? The problem is that I can't insert this
DataTable before I insert all the others, because of the fact that the data in my tblFileSettings depends on the other DataTables...

Any help would be really appreciated!!

Tanksa lot,

Pieter

Jul 22 '05 #6

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

Similar topics

2
by: Carl Lindmark | last post by:
Hello, I am having trouble understanding how to navigate a DataSet table... - maybe someone can steer me in the right direction? Say you've read an XML document into a DataSet ("myDataSet")...
0
by: Chris Ericoli | last post by:
Hi, I am working with an 'in session' ado dataset with an asp.net application. My dataset is comprised of two tables, one of which maintains a few calculated datacolumns. For some reason these...
3
by: Jon | last post by:
I'm learning about datatables. When using the example provided by MS in the ..NET Framework Class Library for DATATABLE (see below) I get an error on line 3 that says "Type expected". Is something...
5
by: DraguVaso | last post by:
Hi, I have a DataSet, which contains several DataTables. I want to put a new DataTable in it (tblFileSettings) just before I write this DataSet to an XML-file. But what I want is that this...
3
by: stockblaster | last post by:
Hello all.. Is it possible to convert a DataTable (i create the DataTable from a CSV file) into binary data and save it into an sql 2005 table (into binary field). After that I want to...
10
by: dauphian | last post by:
Hello, I am new to .net and am trying to build a report application that queries 4 different tables based on a id, and I need to return them in the same table for easy viewing. Basically, I...
9
by: Anil Gupte | last post by:
After reading a tutorial and fiddling, I finally got this to work. I can now put two tables created with a DataTable class into a DataRelation. Phew! And it works! Dim tblSliceInfo As New...
5
by: =?Utf-8?B?SnVsaWEgQg==?= | last post by:
Hi, I wonder if anyone can help? I've got a web form (intranet), .net version 1.1. I've got a sub that populates a datatable in a dataset, dependent on a dropdown field selection. This works...
0
by: =?Utf-8?B?cm9uZSBtYXRpYXM=?= | last post by:
I have the same task to do but everytime I tried to parse my code I get a null value returned after executing "dtMaterials.WriteXml(swMaterials);". I am using the following code: Hope you can hep...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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
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...

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.