3

We recently saw this post:

How do you use version control with Access development?

We then wrote a .vbs script from the example in that post to decompose a .mdb MS Access file.

Problem is, when I run the script against the .mdb file, i get an error:

decompose.vbs(71, 5) (null): Microsoft Office Access can't open the database because it is missing, or opened exclusively by another user.

Well, it's not missing and it's not opened by another user. And there's no lock file associated with it.

Any idea what's going wrong?

Or is there an easier decompose our Access database for use in our versioning software?

Community
  • 1
  • 1
Tikhon
  • 947
  • 2
  • 18
  • 32

5 Answers5

0

from the file header:

' Comment: Uses the undocumented [Application.SaveAsText] syntax '
To reload use the syntax [Application.LoadFromText]

Adam Skinner
  • 877
  • 1
  • 8
  • 10
0

I use this tool: https://github.com/joyfullservice/msaccess-vcs-integration

It's all open source, written in Access. It works like a plug in. You add one module to your DB that contains the settings. That module contains the code to load the version control library and adds buttons on the toolbar for code export. Super quick and easy to use. If you have any problems with it you can make an issue in Github.

HackSlash
  • 4,944
  • 2
  • 18
  • 44
0

As already mentioned, an Access mdb or accdb itself is quite not a good idea to set under version control because of its binary format (no diff, no merge). Once you have individual files, you may use any of the version control systems, because they all are able to handle files.

The script Doug posted provides just exporting of the code, which is merely half the way to a complete source code control/management. I recommend the usage of OASIS, which is able to handle the exchange of VBA source code from Access to individual files and v.v.

As a version control system my preferred one is Mercurial, but this depends on your personal needs of course. There are others around like Subversion or Git, and all of them are free.

Christoph Jüngling
  • 1,080
  • 7
  • 26
0

Like Cat Man Do said, you can use VSS for Source Control, along with the Developer tools. If you're looking for a more robust source control, you can also use Team Foundation Server (TFS). You'll need to install the Team Foundation Server MSSCCI Provider 2010: http://visualstudiogallery.msdn.microsoft.com/bce06506-be38-47a1-9f29-d3937d3d88d6.

This will allow you to do TFS checkins/outs from Access 2007/2010.

StoneJedi
  • 575
  • 1
  • 8
  • 19
-1

Ok.

My boss found this: http://www.accessmvp.com/Arvin/DocDatabase.txt

And it works..

we added a new macro to the Access app and ran the new macro.

BOOM.

Everything written out to our directory.

So

Tikhon
  • 947
  • 2
  • 18
  • 32
  • Uh, this is the second time you've posted this, and again, you're citing code to run in Access, when the request is to run it from VBScript. In short, Arvin's code is great, but it only begins to provide the solution to the stated problem. – David-W-Fenton Mar 02 '10 at 22:28