DataSet into XML

A

Al

1. I need to create a DataSet, containing several DataTables (let's call
them as Workorder, Parts, Labor).
2. Save it as XML file.
3. Send that XML to another Workstation.
4. Open XML on another Workstation into DataSet
5. Display data in controls.
6. Make some changes like add, edit, delete
7. Save those changes into XML
8. Send XML back to the first workstation.
9. Open XML into DataSet and save into SQL Server database.

Everything works fine when I have at least 1 record in each of the
DataTables. If there is no record in the DataTable, I have no information
(like fields names) about DataTable in XML file.

What approach would you suggest to transfer data between 2 workstations
using XML?
I'm using VB 2005

Thank you
Al
 
A

Al

I found the way to do that.
I used WriteXml method without parameters, like this:
dsTemp.WriteXml("G:\WorkOrderXML\Client\Workorder.xml")

but I had to use one, like this:
dsTemp.WriteXml("G:\WorkOrderXML\Client\Workorder.xml",
XmlWriteMode.WriteSchema)

Now everything is fine. Even when I have no records, I have all DataTables
in XML



Al
 

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