BIBD
BIBD

Reputation: 15384

Export and Import MS Access table definitions as text files

How can I export/import MS Access table definitions as text files (in a human readable format like I can with Forms or Reports)?

I know how I can export the whole table out into CSV file; however:

I'm hoping to store my table definitions in a SVN repository. I don't want to have to house any import specifications in the destination database.

Upvotes: 3

Views: 6047

Answers (2)

mnieto
mnieto

Reputation: 3874

If you need to export DAO specific properties, like title, validation text, etc, you can use AccessSVN. The export format is much like the SaveAsText function for forms or queries. And also, you can import back the schema.

Upvotes: 0

HansUp
HansUp

Reputation: 97101

Look at the ExportXML method. I have used it to export both table data and structure. However, based on a quick test, it appears you can drop the DataTarget option, and just export SchemaTarget.

Application.ExportXML _
    ObjectType:=acExportTable, _
    DataSource:="tblFoo", _
    DataTarget:="tblFoo.xml"
    SchemaTarget:="tblFooSchema.xsd"

Upvotes: 4

Related Questions