Load From XML

M

MikeB

Hello all, what is the best / most efficaiant way to load data from XML into
a sqlce database? Here is what I am using to create the XML:

//Create Main Dataset
DataSet dsMain = new DataSet();

//Create Dataset to hold all DB Tables
DataSet dsTables = new DataSet();
myApp.Classes.Globals.gDB.LoadDataset("SELECT table_name FROM
information_schema.tables WHERE table_type = 'TABLE'",dsTables);

foreach(System.Data.DataRow dr in dsTables.Tables[0].Rows )
{
myApp.Classes.Globals.gDB.LoadDataset("SELECT * FROM " +
dr["table_name"].ToString(),dr["table_name"].ToString(),dsMain);
}

//Export to XML
dsMain.WriteXml(@"\SDMMC Disk\\DBBackUp.xml");
 

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