How to programmatically convert a database

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
 
J

John Nurick

Hi Joe,

All JetEngine.CompactDatabase does is convert the .mdb file format,
including the tables and whatever other objects Jet knows about. AFAIK
only Access can convert the specifically Access objects. See e.g. help
on Application.ConvertAccessProject.

If you're managing a corporate conversion, Microsoft suggest downloading
the Access 2003 conversion toolkit at
http://www.microsoft.com/office/ork/2003/journ/accessconvert.htm

Tony Toews's site has some other useful links:
http://www.granite.ab.ca/access/conversionproblems.htm
 
G

Guest

Thanks but it looks like I figured it out. I set the
default database type to 2003 and set the db I wrote the
code in it to exclusive use and that seems to have fixed
the problem. The converted db's now open Ok and they say
they're 2003 format. BTW the code I used was from the MS
KB on how to convert between formats.

-----Original Message-----
Hi Joe,

All JetEngine.CompactDatabase does is convert the .mdb file format,
including the tables and whatever other objects Jet knows about. AFAIK
only Access can convert the specifically Access objects. See e.g. help
on Application.ConvertAccessProject.

If you're managing a corporate conversion, Microsoft suggest downloading
the Access 2003 conversion toolkit at
http://www.microsoft.com/office/ork/2003/journ/accessconv ert.htm

Tony Toews's site has some other useful links:
http://www.granite.ab.ca/access/conversionproblems.htm

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

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
M

Mike

Can u post the microsoft link plzz.
-----Original Message-----
Thanks but it looks like I figured it out. I set the
default database type to 2003 and set the db I wrote the
code in it to exclusive use and that seems to have fixed
the problem. The converted db's now open Ok and they say
they're 2003 format. BTW the code I used was from the MS
KB on how to convert between formats.

-----Original Message-----
Hi Joe,

All JetEngine.CompactDatabase does is convert the .mdb file format,
including the tables and whatever other objects Jet knows about. AFAIK
only Access can convert the specifically Access objects. See e.g. help
on Application.ConvertAccessProject.

If you're managing a corporate conversion, Microsoft suggest downloading
the Access 2003 conversion toolkit at
http://www.microsoft.com/office/ork/2003/journ/accessconv ert.htm

Tony Toews's site has some other useful links:
http://www.granite.ab.ca/access/conversionproblems.htm

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

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
.
 
Z

Zvi Danovich

Hi all,

I think, that the reference is
http://support.microsoft.com/default.aspx?scid=kb;en-us;304318

But - this method needs using ACCESS-2000 itself.

And - if I need STANDALONE routine to be run on end user computer withOUT
ACCESS-2000 installed (JetEngine and MDAC 2.8 ONLY) ?
Can somebody recommend the code on C/C++/VB to performs this task ?

This is URGENT for me !

Thanks for advance.


Mike said:
Can u post the microsoft link plzz.
-----Original Message-----
Thanks but it looks like I figured it out. I set the
default database type to 2003 and set the db I wrote the
code in it to exclusive use and that seems to have fixed
the problem. The converted db's now open Ok and they say
they're 2003 format. BTW the code I used was from the MS
KB on how to convert between formats.

-----Original Message-----
Hi Joe,

All JetEngine.CompactDatabase does is convert the .mdb file format,
including the tables and whatever other objects Jet knows about. AFAIK
only Access can convert the specifically Access objects. See e.g. help
on Application.ConvertAccessProject.

If you're managing a corporate conversion, Microsoft suggest downloading
the Access 2003 conversion toolkit at
http://www.microsoft.com/office/ork/2003/journ/accessconv ert.htm

Tony Toews's site has some other useful links:
http://www.granite.ab.ca/access/conversionproblems.htm

On Mon, 23 Aug 2004 22:04:49 -0700, "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



--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
.
 

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