converting access97 MDB to access2000 MDB, programmatically

S

stevedoulg900

Hello,

I need to convert an Access97 MDB-database to an Access2000 database.
It's no problem using the conversion function of Access2000 itself.

However, I'm looking for a way to do this programmatically (C++, MFC
etc), i.e. I want to write a small tool that converts the databases of
our customers. Upon searching the net and various newsgroups I was not
able to find any information about this.

Any help would be appreciated & thanks for you time,
Steve
 
D

Douglas J. Steele

To be perfectly honest, I wouldn't trust an automated conversion anyhow.
You're still going to need to test that it works properly. The actual
conversion is the least time consuming step.
 
S

steved

Can you give details about the possible problems you mention? I read
the conversion whitepapers, but the information given was quite vague
("should work in most cases" etc). The databases that have to be
converted are quite simple - simple multicolumn tables for pure data
storage. The only reason for the conversion is the doubled file size
(2GB for access2000 instead 1GB for access97).

If I have the customer convert the databases themselves, this would
assume they have the full Access program installed on their system.
This if true for some, but others only have the MDAC drivers installed.

Regards,
Steve
 
D

Douglas J. Steele

Check what Allen Browne has at http://www.allenbrowne.com/ser-48.html

BTW, just because the file size is double doesn't mean you can store twice
as much data. Because Access 2000 and newer uses unicode, it takes 2 bytes
per text character, rather than the previous 1 byte. And if you are going to
convert, I'd suggest moving to Access 2003. Access 2000 wasn't one of the
better versions.
 
S

Sanjib Biswas

Hi Steeve,

You should create an Application having a reference to Microsoft Access
10.0 Object Library or higher. And then convert your access 97 mdb file
using"
Access.Application.ConvertAccessProject(). See below the signature of this
function.

Sub ConvertAccessProject(ByVal SourceFilename As String, ByVal
DestinationFilename As String, ByVal DestinationFileFormat As
Access.AcFileFormat)
Member of: Access.Application._Application

Only drawback to this is that you need to have Access 200x installed in that
m/c.

Regards
Sanjib
 
D

Douglas J. Steele

While that does convert the database, it apparently doesn't actually convert
the VBA. AFAIK, you still have to open the database in the new version of
Access to complete the conversion. A Compile is then recommended.
 
S

steved

Thanks again for your replies.

I've made some more tests regarding the stability of the (so far
manually) converted database, but unfortunately there seem indeed to be
some complications or even bugs (e.g. it does seem to hang itself once
I try to compress it using either Access itself or a library call once
a critical file size is reached; or the compress function does work
(taking 30 mins however) but afterwards the database is unreadable). So
altogether the database upgrade currently does not look very promising,
I suppose I'll have to look for other solutions. Darn...

Regards,
Steve
 

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