How do you use version control with Access development?

后端 未结 20 2063
慢半拍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:05

    Resurrecting an old thread but this is a good one. I've implemented the two scripts (compose.vbs / decompose.vbs) for my own project and ran into a problem with old .mdb files:

    It stalls when it gets to a form that includes the code:

    NoSaveCTIWhenDisabled =1
    

    Access says it has a problem and that's the end of the story. I ran some tests and played around trying to get around this issue and found this thread with a work around at the end:

    Can't create database

    Basically (in case the thread goes dead), you take the .mdb and do a "Save as" to the new .accdb format. Then the source safe or compose/decompose stuff will work. I also had to play around for 10 minutes to get the right command line syntax for the (de)compose scripts to work right so here's that info as well:

    To compose (say your stuff is located in C:\SControl (create a sub folder named Source to store the extracted files):

    '(to extract for importing to source control)
    cscript compose.vbs database.accdb     
    
    '(to rebuild from extracted files saved from an earlier date)
    cscript decompose.vbs database.accdb C:\SControl\Source\
    

    That's it!

    The versions of Access where I've experienced the problem above include Access 2000-2003 ".mdb" databases and fixed the problem by saving them into the 2007-2010 ".accdb" formats prior to running the compose/decompose scripts. After the conversion the scripts work just fine!

提交回复
热议问题