Put a DataTable at the beginning of a DataSet

D

DraguVaso

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
 
K

Ken Tucker [MVP]

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
-----------------
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
 
W

William \(Bill\) Vaughn

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.
__________________________________
 
G

Guest

What about exporting each table to xml individually? You can set up the xml
the way that you like it too :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top