creating an import data routine

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ARC

    #1

    creating an import data routine

    I posted previously about a strategy for importing data from a previous
    database that is in a different version of Access.

    I'm going with the strategy of having 2 sets of linked tables, one linked to
    the source 97 db, one to a blank 2007 db, with a series of append queries.

    It was suggested that, at the minimum, I should do a compact/repair on the
    source db. However, since the source is in Access 97, and I'm writing this
    util in Access 2007, I can't issue a compact / repair on the 97 database
    using 2007 access (I tried, and the compact function returns false)

    Any other thoughts on how to compact / repair the access 97 db?

    My original install did create a compact shortcut, but the database name for
    that shortcut would no longer be valid for network users, or if the user
    changed the db name at some point. The only ideas I have are to "shell" to
    that shortcut, and replace the database name with the source db the user
    browsed to. Not sure if you can even shell out with a command like:

    'Dim RetVal
    'RetVal = Shell("C:\Progr am Files\Access 97 Runtime\Msacces s.exe" /excl
    /runtime /profile "Instant Quote 2000 Professional" /wrkgrp "C:\Program
    Files\Instant Quote 2000\System.mdw " /repair "C:\Program Files\Instant
    Quote 2000\Database.m db" /compact", 1)

    Of course, in the above, I'd have to use a variable for the long string with
    " characters. And I would replace: "C:\Program Files\Instant Quote
    2000\Database.m db" with the source file they selected.

    The only other thought I had would be to somehow re-write the shortcut that
    was installed when the user first installed the program, but I'm not quite
    sure how to do that.

    With either approach above, I wouldn't get a boolean true/false to let me
    know if the process was successful.

    Any ideas would be appreciated. Of course, if the append queries errored out
    due to corruption, I could just have the user e-mail their database, and I
    can run a repair for them.

    Many Thanks,

    Andy



Working...