J
Jenden0
Ok, I'm trying to dump an SQL Server 2005 database to XML via C#, and
I'm having some troubles. I'm relatively new to the whole .net thing,
so there may be some stupid/basic questions/assumptions involved.
The first way I thought about doing it was dumping the entire dataset
to XML. However, as far as I can tell there's no way to populate the
entire dataset at once (I'm using an auto-generated dataset from Visual
Studio 2005). I think if I could do that it would be simplest, but I
haven't even found something hinting that its possible.
Right now I've got a partial solution where I loop through each of the
tables and print that out as XML. However, that is printing them out
as individual entities, instead of printing out the document as one
entire XML document. While that might work, I'd much rather have it
all nice and together.
<database><table1>...</table1><table2>...</table2>... is what I'd like.
What I'm getting is
<document><table1>...</table1></document><document><table2>...</table2></document>...
I'm having some troubles. I'm relatively new to the whole .net thing,
so there may be some stupid/basic questions/assumptions involved.
The first way I thought about doing it was dumping the entire dataset
to XML. However, as far as I can tell there's no way to populate the
entire dataset at once (I'm using an auto-generated dataset from Visual
Studio 2005). I think if I could do that it would be simplest, but I
haven't even found something hinting that its possible.
Right now I've got a partial solution where I loop through each of the
tables and print that out as XML. However, that is printing them out
as individual entities, instead of printing out the document as one
entire XML document. While that might work, I'd much rather have it
all nice and together.
<database><table1>...</table1><table2>...</table2>... is what I'd like.
What I'm getting is
<document><table1>...</table1></document><document><table2>...</table2></document>...