Put a DataTable at the beginning of a DataSet

  • Thread starter Thread starter DraguVaso
  • Start date Start date
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
 
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
 
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.
__________________________________
 
What about exporting each table to xml individually? You can set up the xml
the way that you like it too :)
 
Back
Top