By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,264 Members | 1,100 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,264 IT Pros & Developers. It's quick & easy.

creating an import data routine

P: n/a
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:\Program Files\Access 97 Runtime\Msaccess.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.mdb" /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.mdb" 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,


Sep 11 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.