Xml to SqlCe

  • Thread starter Thread starter Graeme Richardson
  • Start date Start date
G

Graeme Richardson

Hi, I have an xml and an xsd file on the handheld.
I've created a new [empty] SqlCe dB file in code.

What's the most efficient way to get Xml data into the database?

I can do it by creating a table with an SqlCeCommand, and then populating
the table record by record from a DataTable (from DataSet to open the Xml
file) but this seems so inefficient. Also, this method doesn't require the
xsd file.

Thanks, Graeme.
 
You can use the DataSet.ReadXml("XMLFile.xml"); to get the data in the
table - then you can call update from there.
 
Hi, I can't see that this avoids having to create the table with a
SqlCeCommand before populating - I would like to use the xsd file. Have I
missed something?
Are you able to offer a code example of what you have in mind?

Thanks, Graeme.
 
Back
Top