Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Database replaces itself (2k / 2003 )

    I've been trying to figure out a way for my database to see if its the current version, and if not, replace itself..

    I found this http://www.mvps.org/access/modules/mdl0065.htm

    which is a tad complicated, in that i think, i would need its files on every pc in the network.

    So, i figured, maybe there is a way of doing it with a batch file....

    This is a snippet of the code i'm trying.

    It does replace the database, but, at the same time, it leaves it semi-open and the ldb file is still open etc.

    Is there any way of making this tactic work correctly, without using the utility posted on the mvps site. ?


    <font color=blue>'----- check Version history and update if needed ------------------------
    CurrentVersion = DLookup("Version", "Version")
    ThisVersion = DLookup("ThisVersionofDL", "ThisVersion")

    If ThisVersion < CurrentVersion Then
    DoCmd.OpenForm "Updating"
    For Myloop = 1 To 19900
    Next Myloop
    Shell "Socument LibraryDOCUpdate.bat"
    Application.Quit</font color=blue>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Database replaces itself (2k / 2003 )

    I don't know what a "semi-open" database is, but it's probably not a very good idea to let a database replace itself. Better use a utility that does so from "outside".

  3. #3
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Database replaces itself (2k / 2003 )

    Steve, why not try something like what is presented in <post:=516,143>post 516,143</post:>....instead of replacing a database all together, it synchronizes database objects...
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Database replaces itself (2k / 2003 )

    You might want to look at the utility available from http://www.fmsinc.com that is called Total Access Startup. We have used an even more sophisticated homegrown package like it for years and it makes it much easier to manange the deployment of new versions. The downside of course is the price - it's not inexpensive.
    Wendell

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Database replaces itself (2k / 2003 )

    In a word, no. You can either update individual objects from within the database or you can use an external application to overwrite it. In the latter case, the database has to be closed for it to work as you wish. This generally involves as least two database apps, one that does nothing but handle the update and then shell out to the now-updated version.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •