[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


can i export the structure of a mdb database to xml so i can post it, rather than email the database

Posted on 2004-04-06
Medium Priority
Last Modified: 2008-03-17
good day, in my time at ee,i have had to email databases when experts helped me,
is there a way rather i can somehow export the structure of the mdb database to xml, so that when i post again
i can post the code, and the user can somehow from the xml code create a database
e.g. database
3 tables: (and their fields)

Car (tablename)
Question by:jxharding
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 28

Accepted Solution

mmarinov earned 1000 total points
ID: 10763694
you can use this scenario

1. get data from the mdb ( using dataadapter and dataset )
2. then you can get the structure of the dataset with the ReadXmlSchema
3. to write the schema to a file you can use this:
private void WriteSchemaWithXmlTextWriter(DataSet thisDataSet){
   // Set the file path and name. Modify this for your purposes.
   string filename="mySchema.xml";
   // Create a FileStream object with the file path and name.
   System.IO.FileStream myFileStream = new System.IO.FileStream
   // Create a new XmlTextWriter object with the FileStream.
   System.Xml.XmlTextWriter MyXmlTextWriter =
      new System.Xml.XmlTextWriter(myFileStream, System.Text.Encoding.Unicode);
   // Write the schema into the DataSet and close the reader.
   thisDataSet.WriteXmlSchema(MyXmlTextWriter );

Private Sub WriteSchemaWithXmlTextWriter(thisDataSet As DataSet)
    ' Set the file path and name. Modify this for your purposes.
    Dim filename As String = "mySchema.xml"
    ' Create a FileStream object with the file path and name.
    Dim myFileStream As New System.IO.FileStream _
       (filename, System.IO.FileMode.Create)
    ' Create a new XmlTextWriter object with the FileStream.
    Dim MyXmlTextWriter As New System.Xml.XmlTextWriter _
       (myFileStream, System.Text.Encoding.Unicode)
    ' Write the schema into the DataSet and close the reader.
End Sub


Assisted Solution

theonlyfreaky earned 1000 total points
ID: 10763711
this program does the job for me

download: http://www.pablovandermeer.nl/getfile.php?id=21
explanation: http://www.pablovandermeer.nl/mdb_2_xml.html

(it's free for personal use)

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question