Compact and Repair with Access 2003 Runtime

R

Ron Hinds

We have an app that currently uses the Access 97 runtime. We are working on
updating it to use the Access 2003 Runtime. One issue I have run into at one
of our Beta sites is Compact and Repair. I wrote a VB utility to do Comapact
and Repair for the A97 app. I used the DAO360.DLL library. One of the
functions I included in the utility is a Rebuild function. It's purpose is
for those rare occasions when the CompactDatabase method can't repair a
database - it creates a new, blank database, recreates all of the tables and
indexes, then copies the data from the original (similar to the method of
creating a blank DB and importing everything from the old DB if you have the
full version of Access). The problem is the CreateDatabase method, which
accepts a constant for the version, only has constants for versions up to
dbVersion30, i.e., Access 97 format. That seems pretty odd for a Jet 4 DLL.
CompactDatabase, in fact, which allows for converting the Jet version of a
database, also only supports up to dbVersion30. Fortunately CompactDatabase,
with no version supplied, doesn't change the current version, and it does
work on an A2K3 database. Does anyone have any suggestions? Is it possible
to create a new database using the A2K3 Runtime e.g. from the command line?
For that matter, where can I find a list of command line parameters for the
A2K3 Runtime? TIA!
 
G

Guest

Are you sure you are using DAO360 ? It sounds more like you
are using
createobject("dao.dbEngine")
or some other Jet 3.0 object.

There certainly is a value for dbVersion40. if you use the correct library.

(david)
 
R

Ron Hinds

Thanks David - you were correct. Apparently the problem has something to do
with my help file - when I brought up help for CreateDatabase it only showed
up to dbVersion30 as an option. But just now I used the Object Browser and
sure enough, dbVersion40 is specified there. Thanks again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top