From ce8d964f3286ea0c169e2e1ff32b3fafaefdb9c9 Mon Sep 17 00:00:00 2001 From: Lukas Ziegler Date: Sat, 6 Mar 2021 13:35:28 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=9EREADME.md=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7ee8123..9afc312 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,27 @@ -# access_vcs +# Version Controll for MS Access -VCS for Acess \ No newline at end of file +Scripts from +https://stackoverflow.com/questions/187506/how-do-you-use-version-control-with-access-development + +## decompose.vbs +You can execute this script by calling cscript `decompose.vbs `. In case you omit the second parameter, it will create 'Source' folder where the database is located. Please note that destination folder will be wiped if it already exists. + +### Include data in the exported tables +Replace line 93: `oApplication.ExportXML acExportTable, myObj.Name, , sExportpath & "\" & myObj.Name & ".table.txt"` + +with line `oApplication.ExportXML acExportTable, myObj.Name, sExportpath & "\" & myObj.Name & ".table.txt"` + +## compose.vbs +Text-file only solution (queries, tables and relationships included) +I have altered the Oliver's pair of scripts so that they export/import relationships, tables and queries in addition to modules, classes, forms and macros. Everything is saved into plaintext files, so there is no database file created to be stored with the text files in version control. + +You can execute this script by calling cscript `compose.vbs `. In case you omit the second parameter, it will look into 'Source' folder where the database should be created. + +### Import data from text file +Replace line 14: `const acStructureOnly = 0` with `const acStructureOnly = 1`. This will work only if you have included the data in exported table. + +## Things that are not covered +1. I have tested this only with .accdb files, so with anything else there might be some bugs. +2. Setting are not exported, I would recommend creating the Macro that will apply the setting at start of the database. +3. Some unknown queries sometimes get exported that are preceded with '~'. I don't know if they are necessary. +4. MSAccess object names can contain characters that are invalid for filenames - the script will fail when trying to write them. You may normalize all filenames, but then you cannot import them back.