you need to use the oledbconnection, dataadapter and generate a dataset from
them. Us the writexml method of the dataset to write the data to the
currently set iostream
HTH
Private Sub WriteXmlToFile(thisDataSet As DataSet)
If thisDataSet Is Nothing Then
Return
End If
' Create a file name to write to.
Dim filename As String = "myXmlDoc.xml"
' Create the FileStream to write with.
Dim myFileStream As New System.IO.FileStream _
(filename, System.IO.FileMode.Create)
' Create an XmlTextWriter with the fileStream.
Dim myXmlWriter As New System.Xml.XmlTextWriter _
(myFileStream, System.Text.Encoding.Unicode)
' Write to the file with the WriteXml method.
thisDataSet.WriteXml(myXmlWriter)
myXmlWriter.Close()
End Sub
--
Regards - One Handed Man
Author : Fish .NET & Keep .NET
=========================================
This posting is provided "AS IS" with no warranties,
and confers no rights.
"Thu" <th***********@hotmail.com> wrote in message
news:02****************************@phx.gbl...
I store me reporting data in MS Access table, and I need
to programmatically generate XML file (in text) that
loads these data, include all these data with appropriate
definition, i.e. root, elements, entities, and sends
these data to another party on daily basis.
Does anyone know the easiest way to achieve this? Is
there a class that loads data from MS Access, match them
with definition files, and generate XML text file
automatically?
Thanks.