How do you use version control with Access development?

后端 未结 20 1702
慢半拍i
慢半拍i 2020-11-22 12:55

I\'m involved with updating an Access solution. It has a good amount of VBA, a number of queries, a small amount of tables, and a few forms for data entry & report gene

相关标签:
20条回答
  • 2020-11-22 13:14

    i'm using the Access 2003 Add-in: Source Code Control. It works fine. One Problem are invalid characters like a ":".

    I'm checkin in and out. Internly the Add-In do the same as the code up there, but with more tool support. I can see if an object is checked out and refresh the objects.

    0 讨论(0)
  • 2020-11-22 13:17

    The compose/decompose solution posted by Oliver is great, but it has some problems:

    • The files are encoded as UCS-2 (UTF-16) which can cause version control systems/tools to consider the files to be binary.
    • The files contain a lot of cruft that changes often - checksums, printer information and more. This is a serious problem if you want clean diffs or need to cooperate on the project.

    I was planning to fix this myself, but discovered there is already a good solution available: timabell/msaccess-vcs-integration on GitHub. I have tested msaccess-vcs-integration and it does work great.

    Updated 3rd of March 2015: The project was originally maintained/owned by bkidwell on Github, but it was transferred to timabell - link above to project is updated accordingly. There are some forks from the original project by bkidwell, for example by ArminBra and by matonb, which AFAICT shouldn't be used.

    The downside to using msaccess-vcs-integration compared to Olivers's decompose solution:

    • It's significantly slower. I'm sure that the speed issue can be fixed, but I don't need to export my project to text that often ...
    • It doesn't create a stub Access project with the exported stuff removed. This can also be fixed (by adopting code from the decompose script), but again - not that important.

    Anyway, my clear recommendation is msaccess-vcs-integration. It solved all the problems I had with using Git on the exported files.

    0 讨论(0)
  • 2020-11-22 13:18

    It appears to be something quite available in Access:

    This link from msdn explains how to install a source control add-in for Microsoft Access. This shipped as a free download as a part of the Access Developer Extensions for Access 2007 and as a separate free add-in for Access 2003.

    I am glad you asked this question and I took the time to look it up, as I would like this ability too. The link above has more information on this and links to the add-ins.

    Update:
    I installed the add-in for Access 2003. It will only work with VSS, but it does allow me to put Access objects (forms, queries, tables, modules, ect) into the repository. When you go edit any item in the repo you are asked to check it out, but you don't have to. Next I am going to check how it handles being opened and changed on a systems without the add-in. I am not a fan of VSS, but I really do like the thought of storing access objects in a repo.

    Update2:
    Machines without the add-in are unable to make any changes to the database structure (add table fields, query parameters, etc.). At first I thought this might be a problem if someone needed to, as there was no apparent way to remove the Access database from source control if Access didn't have the add-in loaded.

    Id discovered that running "compact and repair" database prompts you if you want to remove the database from source control. I opted yes and was able to edit the database without the add-in. The article in the link above also give instructions in setting up Access 2003 and 2007 to use Team System. If you can find a MSSCCI provider for SVN, there is a good chance you can get that to work.

    0 讨论(0)
  • 2020-11-22 13:18

    We developped our own internal tool, where:

    1. Modules: are exported as txt files and then compared with "file compare tool" (freeware)
    2. Forms: are exported through the undocument application.saveAsText command. It is then possible to see the differences between 2 different versions ("file compare tool" once again).
    3. Macros: we do not have any macro to compare, as we only have the "autoexec" macro with one line launching the main VBA procedure
    4. Queries: are just text strings stored in a table: see infra
    5. tables: we wrote our own table comparer, listing differences in records AND table structure.

    The whole system is smart enough to allow us to produce "runtime" versions of our Access application, automatically generated from txt files (modules, and forms being recreated with the undocument application.loadFromText command) and mdb files (tables).

    It might sound strange but it works.

    0 讨论(0)
  • 2020-11-22 13:19

    For completeness...

    There's always "Visual Studio [YEAR] Tools for the Microsoft Office System" (http://msdn.microsoft.com/en-us/vs2005/aa718673.aspx) but that seems to require VSS. To me VSS (auto corrupting) is worse than my 347 save points on my uber backuped network share.

    0 讨论(0)
  • 2020-11-22 13:20

    I'm using Oasis-Svn http://dev2dev.de/

    I just can tell it has saved me at least once. My mdb was growing beyond 2 GB and that broke it. I could go back to an old version and import the Forms and just lost a day or so of work.

    0 讨论(0)
提交回复
热议问题