|
-
September 4th, 2008, 04:54 PM
#1
Generate Access Database from XML schema
I'm trying to generate tables inside an Access database with an XML schema file. Then I want to fill those tables with data from XML files that are based on the later XML schema. I've been trying forever just to get the tables created inside the database but with no success. I guess I just don't understand ADO .NET yet. Here is the code I'm working with. After I load the XML schema into the dataset I can see that the data set has all the Tables and Columns I want. How do I put those in the database?
public void WriteToDatabase(String xml)
{
TextReader stringReader = new StringReader(xml);
// Create a validating reader that wraps the XmlNodeReader object.
XmlReader reader = XmlReader.Create(stringReader, m_settings);
m_dataSet.ReadXmlSchema("Summary.xsd")
m_dataSet.ReadXml(reader);
m_dataSet.AcceptChanges();
m_oleDbDataAdapter.Fill(m_dataSet);
m_oleDbDataAdapter.Update(m_dataSet);
}
Last edited by Galen; September 5th, 2008 at 08:10 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|