Discussion:
HOWTO convert programmatically .MDB to .ACCDB
(too old to reply)
nico
2008-05-30 06:40:01 UTC
Permalink
Hi!

Any idea howto convert a MS Access 2003 Database (MDB-Format) to a MS
Access 2007 Database (ACCDB- Format) programmatically?


Suppose that MS Access 2007 is not installed.
The MDB-database is just a very simple one, without forms, VBA, security.
Just data.
Does exist a tool or an API function for this?


Thank you in advance,
Nicoleta
Alex Dybenko
2008-05-30 08:53:09 UTC
Permalink
Hi,
cant check now - but try compactdatabase method, for all previous versions
that worked
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
Post by nico
Hi!
Any idea howto convert a MS Access 2003 Database (MDB-Format) to a MS
Access 2007 Database (ACCDB- Format) programmatically?
Suppose that MS Access 2007 is not installed.
The MDB-database is just a very simple one, without forms, VBA, security.
Just data.
Does exist a tool or an API function for this?
Thank you in advance,
Nicoleta
Douglas J. Steele
2008-05-30 20:02:07 UTC
Permalink
I doubt very much that that would work to convert to ACCDB if Access 2007
wasn't installed.

Nico: Why do you want to bother converting? There are no problems accessing
data that's in the format of previous versions of Access from newer versions
of Access.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
Post by Alex Dybenko
Hi,
cant check now - but try compactdatabase method, for all previous versions
that worked
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
Post by nico
Hi!
Any idea howto convert a MS Access 2003 Database (MDB-Format) to a MS
Access 2007 Database (ACCDB- Format) programmatically?
Suppose that MS Access 2007 is not installed.
The MDB-database is just a very simple one, without forms, VBA, security.
Just data.
Does exist a tool or an API function for this?
Thank you in advance,
Nicoleta
Alex Dybenko
2008-05-31 04:45:40 UTC
Permalink
Hi Doug,
but if ADE is installed (why do you need accdb then?) then compactdatabase -
is a method of ADE, can be called from Word for example. ADE can be
installed without access:
http://accessblog.net/2007/01/microsoft-office-access-database.html
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
Post by Douglas J. Steele
I doubt very much that that would work to convert to ACCDB if Access 2007
wasn't installed.
Nico: Why do you want to bother converting? There are no problems
accessing data that's in the format of previous versions of Access from
newer versions of Access.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
Post by Alex Dybenko
Hi,
cant check now - but try compactdatabase method, for all previous
versions that worked
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
Post by nico
Hi!
Any idea howto convert a MS Access 2003 Database (MDB-Format) to a MS
Access 2007 Database (ACCDB- Format) programmatically?
Suppose that MS Access 2007 is not installed.
The MDB-database is just a very simple one, without forms, VBA, security.
Just data.
Does exist a tool or an API function for this?
Thank you in advance,
Nicoleta
Douglas J. Steele
2008-05-31 19:11:59 UTC
Permalink
I hadn't thought in terms of installing the ADE. Yes, that should work.

But it still begs the question of "why?"
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
Post by Alex Dybenko
Hi Doug,
but if ADE is installed (why do you need accdb then?) then
compactdatabase - is a method of ADE, can be called from Word for example.
http://accessblog.net/2007/01/microsoft-office-access-database.html
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
Post by Douglas J. Steele
I doubt very much that that would work to convert to ACCDB if Access 2007
wasn't installed.
Nico: Why do you want to bother converting? There are no problems
accessing data that's in the format of previous versions of Access from
newer versions of Access.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
Post by Alex Dybenko
Hi,
cant check now - but try compactdatabase method, for all previous
versions that worked
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
Post by nico
Hi!
Any idea howto convert a MS Access 2003 Database (MDB-Format) to a MS
Access 2007 Database (ACCDB- Format) programmatically?
Suppose that MS Access 2007 is not installed.
The MDB-database is just a very simple one, without forms, VBA, security.
Just data.
Does exist a tool or an API function for this?
Thank you in advance,
Nicoleta
Alex Dybenko
2008-06-01 06:52:19 UTC
Permalink
Perhaps Nicoleta can tell us...
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
Post by Douglas J. Steele
I hadn't thought in terms of installing the ADE. Yes, that should work.
But it still begs the question of "why?"
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
Post by Alex Dybenko
Hi Doug,
but if ADE is installed (why do you need accdb then?) then
compactdatabase - is a method of ADE, can be called from Word for
http://accessblog.net/2007/01/microsoft-office-access-database.html
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
Post by Douglas J. Steele
I doubt very much that that would work to convert to ACCDB if Access 2007
wasn't installed.
Nico: Why do you want to bother converting? There are no problems
accessing data that's in the format of previous versions of Access from
newer versions of Access.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
Post by Alex Dybenko
Hi,
cant check now - but try compactdatabase method, for all previous
versions that worked
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
Post by nico
Hi!
Any idea howto convert a MS Access 2003 Database (MDB-Format) to a MS
Access 2007 Database (ACCDB- Format) programmatically?
Suppose that MS Access 2007 is not installed.
The MDB-database is just a very simple one, without forms, VBA, security.
Just data.
Does exist a tool or an API function for this?
Thank you in advance,
Nicoleta
Albert D. Kallal
2008-05-31 19:19:11 UTC
Permalink
Post by Alex Dybenko
Hi Doug,
but if ADE is installed (why do you need accdb then?) then
compactdatabase - is a method of ADE, can be called from Word for example.
http://accessblog.net/2007/01/microsoft-office-access-database.html
Very interesting link. I was not aware that the ACE engine was available as
a separate download.

Thanks for that tip Alex...

So, yes...one can then likely convert using code without having to install
ms-access (but, the 07 ACE engine does need to be installed).

As we say, there always more then one way to skin a cat....
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
***@msn.com
nico
2008-06-04 09:24:00 UTC
Permalink
Hi,

sorry ... I was out of office for some days.

"Nico: Why do you want to bother converting? There are no problems accessing
data that's in the format of previous versions of Access from newer versions
of Access."

We have to decide for a dektop database for our project. In this project is
no need for the MS Access user interface. It is no need for reports, forms,
.... By default, the end-user will not need to operate directly the database.
We need just a very simple relational database engine. We think the MS
Access may be the right solution for the project. Now, there are 2 differents
formats: MDB and ACCDB. Which one should we choose? We analysed the
differences and we think that MDB is enough for the moment. But if in the
future it will be necessary to use the accdb format we want to be sure that a
programmatic conversion is not a problem.

Thank you for the tipps.
I tried to make a dummy test. I installed the Access Database Engine and the
Access 2007 Developer Extensions (ADE). I suppose I have to use the
CompactDatabse method of the ActiveX AccessDE.dll . I think the installation
was not successfull although was no error message. The ActiveX can't be
registered. The mso.dll and the msvcr80.dll are missing. And when I copy the
dlls from another folder to the actual one by registering it comes another
error message, error code: 0x80004001. Any ideea?

Is it possible also through ADO to convert/compact an Access database?

Thank you,
Nicoleta
Post by Albert D. Kallal
Post by Alex Dybenko
Hi Doug,
but if ADE is installed (why do you need accdb then?) then
compactdatabase - is a method of ADE, can be called from Word for example.
http://accessblog.net/2007/01/microsoft-office-access-database.html
Very interesting link. I was not aware that the ACE engine was available as
a separate download.
Thanks for that tip Alex...
So, yes...one can then likely convert using code without having to install
ms-access (but, the 07 ACE engine does need to be installed).
As we say, there always more then one way to skin a cat....
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
Brendan Reynolds
2008-06-04 09:55:08 UTC
Permalink
"nico" <***@discussions.microsoft.com> wrote in message news:8233F975-CD81-4081-8DF0-***@microsoft.com...
<snip>
Post by nico
We have to decide for a dektop database for our project. In this project is
no need for the MS Access user interface. It is no need for reports, forms,
.... By default, the end-user will not need to operate directly the database.
We need just a very simple relational database engine. We think the MS
Access may be the right solution for the project. Now, there are 2 differents
formats: MDB and ACCDB. Which one should we choose? We analysed the
differences and we think that MDB is enough for the moment. But if in the
future it will be necessary to use the accdb format we want to be sure that a
programmatic conversion is not a problem.
<snip>

Rather than trying to programmatically convert the MDB to an ACCDB, I would
create an ACCDB with empty tables and import the data from the MDB. It's
safer, in that it makes no changes to the original MDB. Its quite easily
done, you just have to import the tables in the correct order, that is to
say, import the table on the one side of a one-to-many relationship before
attempting to import the table on the many side. (Alternatively you could
create the new ACCDB without relationships defined, import the data, then
programmatically create the relationships.)
--
Brendan Reynolds
nico
2008-06-04 11:38:01 UTC
Permalink
Yes, clear. I thought there is a shorter way ...

Nicoleta
Post by Brendan Reynolds
<snip>
Post by nico
We have to decide for a dektop database for our project. In this project is
no need for the MS Access user interface. It is no need for reports, forms,
.... By default, the end-user will not need to operate directly the database.
We need just a very simple relational database engine. We think the MS
Access may be the right solution for the project. Now, there are 2 differents
formats: MDB and ACCDB. Which one should we choose? We analysed the
differences and we think that MDB is enough for the moment. But if in the
future it will be necessary to use the accdb format we want to be sure that a
programmatic conversion is not a problem.
<snip>
Rather than trying to programmatically convert the MDB to an ACCDB, I would
create an ACCDB with empty tables and import the data from the MDB. It's
safer, in that it makes no changes to the original MDB. Its quite easily
done, you just have to import the tables in the correct order, that is to
say, import the table on the one side of a one-to-many relationship before
attempting to import the table on the many side. (Alternatively you could
create the new ACCDB without relationships defined, import the data, then
programmatically create the relationships.)
--
Brendan Reynolds
Tony Toews [MVP]
2008-06-06 02:59:06 UTC
Permalink
Post by nico
"Nico: Why do you want to bother converting? There are no problems accessing
data that's in the format of previous versions of Access from newer versions
of Access."
We have to decide for a dektop database for our project. In this project is
no need for the MS Access user interface. It is no need for reports, forms,
.... By default, the end-user will not need to operate directly the database.
We need just a very simple relational database engine. We think the MS
Access may be the right solution for the project. Now, there are 2 differents
formats: MDB and ACCDB. Which one should we choose?
Jet 4.0 (DAO 3.6) is included in the Windows XP and Vista operating
systems so no install is required. ACCDBs will require an install of
the ACE engine. If your software requires an administrator to install
it then this isn't a problem. But if you can install the software
using a user account then I'd stick with Jet 4.0.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Loading...