How to programmatically convert a database

  • Thread starter Thread starter Joe Bertolini
  • Start date Start date
J

Joe Bertolini

Hello all,

I have a client that wants to upgrade from Access 97 to
2003 and they need to convert approx 5000 existing db's.
Obviously this would be a real pain to do interactively
so I'm trying to write a small utility to do
automatically. I seem to have it running using the
following statement to do the actual conversion :

Dim objEngine As JRO.JetEngine
Set objEngine = CreateObject("JRO.JetEngine")

objEngine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.
0;Data Source=" & strSourceDB, _
"Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine
Type=5;Data Source=" & strDestDB


It seems to work Ok but when I try to open one of the
converted db's Access prompts to convert the database. If
I try to open the converted db without converting it I
get an error saying that it's read only when it's
definitely not. Anyone got any ideas?


TIA

Joe
 
without answering what you have here, have a look at the MDE that is
available from trigeminal.com that converts databases. Also have look in
the vba help for the convertdatabase function. It exists in XP so it should
be in 2003. I'm not positive but I don't believe that the compact database
command can convert a db.
 
Back
Top