none
Version control for MS Access/VBA database RRS feed

  • Question

  • Hi.  I'm somewhat of a Access/VBA noob.  I'm developing my first Access app (2010).  I need an approach to version control.  As I'm developing my Access/VBA app, I back up the .accdb file when I get the app to a point where I'm satisfied with it's functionality.  Also, I back it up often in case it crashes or becomes corrupt, which unfortunately happens all too frequently (and so I've had to revert to a previous backups a few times.)  I've ended up with a large number of backups, and backups of my backups.  Obviously, I don't have a good naming convention or versioning scheme.  On occassion, I'm not sure what the most recent working database file is. Can anyone help me with suggesting a naming convention, versioning, and backup scheme?  Also, is it possible to stamp a database with a revision or build number -- like is there a property field for a rev #?  What would be your approach to doing that?  Thanks for your help.
    • Edited by District9 Tuesday, September 1, 2015 10:27 PM
    Tuesday, September 1, 2015 10:26 PM

Answers

  • Assume you are a solo developer?

    This isn't strictly speaking a versioning system, nor a rigorous design/code/test methodology, but it does work for me to: a) ensure that I always have a recent backup; b) isolate changes from affecting anything until they are well tested; and c) allow me to develop on multiple devices (workstation or laptop as desired).

    What I do is to keep a "master" copy of all relevant content (front-end app, back-end DB, any supporting files, documentation, etc.) in a folder structure on shared server folder on my network. I use Windows Server, but of course you don't need a "real" server, you could just use storage on a home NAS or even another client PC in a workgroup.

    I then use a freeware tool from Microsoft called SyncToy to keep everything in sync between server and client during development. I can "check out" my project by syncing to my client, and then when I am done coding and testing for a session, I'll sync changes back to the "master" copy online. This approach also allows me to quickly switch between devices (for example, I might grab my Surface to do some work on the go).

    You could use other sync software but the key thing you want is manual, not automatic, synchronization. If something does go south, this way you can easily recover back to the master copy on the server, and have lost at most only a few hours work.

    This approach obviously is for a one-man shop; it's not a real solution if you need to sync changes between multiple developers.

    The other advice I would share is to investigate and follow recommended Access best practices for design, naming conventions, etc. There are lots of experienced developers on this forum who can point you to such resources or who have even written them themselves.





    Tuesday, September 1, 2015 10:48 PM
  • I like Gary's suggestions,

    When I first began building db's it was a disaster trying to keep up with changes and finding out I deleted the wrong file a couple of times. So I developed a habit of sorts.

    Copy the production file to the design station, give it a file name that can easily express what it is, when it is and document the work done.

    Let's say you are making a conservation db and working on it today at 11:30 PM and adding a Table to store data for naturally occurring water temperature changes. So you could have a file name like; Conservation_2015 09 01_1130PM_Table Water Temp. Then lets say you make a Query 15 minutes later and a Form and Report tomorrow. so you could have four files that are automatically in order in a folder due to your naming convention like this;

    • Conservation_2015 09 01_2330_Table Water Temp
    • Conservation_2015 09 01_2345_Query Water Temp
    • Conservation_2015 09 02_0110_Form Water Temp
    • Conservation_2015 09 02_0130_Report Water Temp

    Your folder will automatically, when sorted by name, keep all database files for conservation grouped together and the chronological date and time indicators will keep them in the order you worked on them while the last section tells the work done. You could lump all those into 1 but why bother with trying to undo what didn't work in your Form coding when you can just reopen a copy of the Query to continue.

    That is just an idea...


    Just takes a click to give thanks for a helpful post or answer.
    Please vote “Helpful” or Mark as “Answer” as appropriate.
    Chris Ward
    Microsoft Community Contributor 2012

    Wednesday, September 2, 2015 4:54 AM

All replies

  • Assume you are a solo developer?

    This isn't strictly speaking a versioning system, nor a rigorous design/code/test methodology, but it does work for me to: a) ensure that I always have a recent backup; b) isolate changes from affecting anything until they are well tested; and c) allow me to develop on multiple devices (workstation or laptop as desired).

    What I do is to keep a "master" copy of all relevant content (front-end app, back-end DB, any supporting files, documentation, etc.) in a folder structure on shared server folder on my network. I use Windows Server, but of course you don't need a "real" server, you could just use storage on a home NAS or even another client PC in a workgroup.

    I then use a freeware tool from Microsoft called SyncToy to keep everything in sync between server and client during development. I can "check out" my project by syncing to my client, and then when I am done coding and testing for a session, I'll sync changes back to the "master" copy online. This approach also allows me to quickly switch between devices (for example, I might grab my Surface to do some work on the go).

    You could use other sync software but the key thing you want is manual, not automatic, synchronization. If something does go south, this way you can easily recover back to the master copy on the server, and have lost at most only a few hours work.

    This approach obviously is for a one-man shop; it's not a real solution if you need to sync changes between multiple developers.

    The other advice I would share is to investigate and follow recommended Access best practices for design, naming conventions, etc. There are lots of experienced developers on this forum who can point you to such resources or who have even written them themselves.





    Tuesday, September 1, 2015 10:48 PM
  • Thanks.  I'm solo; not a team project.  Hence no formal version control system as yet.
    Tuesday, September 1, 2015 11:09 PM
  • I like Gary's suggestions,

    When I first began building db's it was a disaster trying to keep up with changes and finding out I deleted the wrong file a couple of times. So I developed a habit of sorts.

    Copy the production file to the design station, give it a file name that can easily express what it is, when it is and document the work done.

    Let's say you are making a conservation db and working on it today at 11:30 PM and adding a Table to store data for naturally occurring water temperature changes. So you could have a file name like; Conservation_2015 09 01_1130PM_Table Water Temp. Then lets say you make a Query 15 minutes later and a Form and Report tomorrow. so you could have four files that are automatically in order in a folder due to your naming convention like this;

    • Conservation_2015 09 01_2330_Table Water Temp
    • Conservation_2015 09 01_2345_Query Water Temp
    • Conservation_2015 09 02_0110_Form Water Temp
    • Conservation_2015 09 02_0130_Report Water Temp

    Your folder will automatically, when sorted by name, keep all database files for conservation grouped together and the chronological date and time indicators will keep them in the order you worked on them while the last section tells the work done. You could lump all those into 1 but why bother with trying to undo what didn't work in your Form coding when you can just reopen a copy of the Query to continue.

    That is just an idea...


    Just takes a click to give thanks for a helpful post or answer.
    Please vote “Helpful” or Mark as “Answer” as appropriate.
    Chris Ward
    Microsoft Community Contributor 2012

    Wednesday, September 2, 2015 4:54 AM