Dataset -> XML -> Access .adp file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Plumer

    Dataset -> XML -> Access .adp file

    Good morning everyone,

    Using C# I create a bog-standard System.Data.Dat aTable
    which I then Add to a System.Data.Dat aset.

    I need to import that structure into an Access .adp file
    so I have taken the approach of using XmlTextWriter to
    create an xml file. This works just fine and the IDE can
    certainly read it back and interpret it correctly. But
    Access cannot. It tells me that it cannot create table
    using the information contained in the document.

    If someone knows the details could you please tell me what
    I need to do to make this happen. Clearly the VS C#
    implementation and Access are meant to be able to
    communicate through this mechanism and it seems that I
    have chosen wrong settings for some factor somewhere.

    The code I used to write the file (this come more or les
    directly from the Help on XML) is:

    private void WriteSchema()
    {
    string fn = @"C:\InfoMan\In foData\mySchema .xml";

    System.IO.FileS tream fs =
    new System.IO.FileS tream(
    fn,System.IO.Fi leMode.Create );

    System.Xml.XmlT extWriter xw =
    new System.Xml.XmlT extWriter( fs,
    System.Text.Enc oding.Unicode );

    _DataSet.WriteX mlSchema( xw );
    xw.Close();
    }

    Thanks in advance for any advice you can give me,

    Plumer



Working...