简体   繁体   中英

MS-Access .mdb compiler?

Does anyone know of a tool that can create a MS-Access database from a configuration file? It needs to be able to do things outside of the SQL spec such as be able to create macros, modules, and forms, and make changes to the "Lookup" tab that's available in Design View.

And if possible, I need to be able to export an existing database to the configuration file format.

The reason I need this is because we currently check a .mdb file with almost 200 tables into CVS, so it gets checked in quite often. And since it's a binary file, there's no easy way to diff two different revisions of the file.

I suppose I could do it all programmatically using vbscript, but surely there must be an easier way.

You don't need to check the binary .mdb in wholesale. MS Access supports Visual Sourcesafe that gives finer grain control. I've used it in anger and it works fine.

Using Visual SourceSafe in Microsoft Access

Failing that see: How do you use version control with Access development?

The little documented SaveAsText and LoadFromText At the debug/immediate window type: Application.SaveAsText acForm,"MyForm","c:\\form.txt You can load the file into a new MDB. Application.LoadFromText acForm,"MyForm","c:\\from.txt"

Sample code at http://www.datastrat.com/Code/DocDatabase.txt for saving all objects in an MDB. Objects as Text http://iridule.net/cu/index.htm (At the bottom.) This is a MS Access add-in that provides a GUI for the SaveAsText and LoadFromText methods.

However this is the same method a CVS such as Microsoft SourceSafe uses with Access.

Extracting/inserting forms, macros and modules between ms-access and text files can be easily done via the 'saveAsText' / 'LoadFromText' methods, as already proposed here. You can then compare multiple version of files with any tool similar to 'Files Compare Tool'.

In addition to links already quoted on ths page, please see serialize ms access database objects to text files and working with multiple programmers on ms access

But unfortunately the 'saveAsText' method is quite unuseful when it comes to table comparison, where both data and structure have to be compared! Text files generated by this method only compare table content, but not table structure. You'll have either to write your own tool or to find the one that fits your need on the web (I guess you'll google something like ms-access table compare).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM