Problem with DataSet XMLWrite

S

Sid Price

I have a dataset in my application (VB.NET 2005) that I need to write to an
XML file. The code that builds the dataset looks like this:
MyConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=" & cVMCC_DatabasePath & ";")

selectCMD = New OleDbCommand(strQuery, MyConnection)

myDataAdaptor.SelectCommand = selectCMD

myDataAdaptor.Fill(MyDataSet, "Table")

I then call xmlwrite like this:

aDataSet.WriteXml("Sources.xml")

When I examine the XML file I see:

<?xml version="1.0"?>
<doc>
<assembly>
<name>
VM_Signals
</name>
</assembly>
<members>

</members>
</doc>

The data set contains one table with 32 rows of data, but the data does not
appear in the XML file. Please can someone see what I am missing?

Thanks,

Sid.
 
R

RobinS

Are you sure that the dataset actually has data in it? You've checked it in
the debugger?

RobinS.
GoldMail, Inc.
 
S

Sid Price

Thanks for responding, I discovered that it was not writing to the file I
thought it was and when I checked the correct file (same name different
folder) it was working,
Sid.
 

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