Problem with DataSet XMLWrite

  • Thread starter Thread starter Sid Price
  • Start date Start date
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.
 
Are you sure that the dataset actually has data in it? You've checked it in
the debugger?

RobinS.
GoldMail, Inc.
 
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.
 
Back
Top