Xml to SqlCe

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.
 
W

W.G. Ryan eMVP

You can use the DataSet.ReadXml("XMLFile.xml"); to get the data in the
table - then you can call update from there.
 
G

Graeme Richardson

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.
 

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

Similar Threads

Xml file to SQLCe 3
XML to SQLce 4
XML to SQLce 2
XML to SQLCE 6
XML DTDs Versus XML Schema 0
Load XML into SQLCE 1
Load From XML 1
Updating the SqlCe database from a DataSet 5

Top