Converting from 97 to 2002 - DAO/ADO

W

wysiwyg

I'm getting conversion errors telling me to update the obsolete DAO before
converting my database from 97 to 2002. The only DAO in the database is
what Access wrote on its own when I created the switchboard. How much
credit does MS give me? More importantly, how do I know what update it to?

For example, one of the lines highlighted in the code window is "Dim dbs As
Database" . Do I just change it to Dim dbs as DAO.Database?

Is there a place where I can plug in each offending line and get the proper
syntax to update to?

Thanks in advance!
 
A

Allen Browne

If your Access 97 database contains a reference to:
Microsoft DAO .3.5x Library
it should automaticaly convert to the DAO 3.6 required by 2002.

If it contains a reference to:
Microsoft DAO 2.5/3.5 Compatibility Layer
you will need to remove that library, and re-write affected code before you
convert.

The compatibility layer allowed Access 1 and 2 databases to work in Access
95 or 97. There is no such thing as a Compatibility Layer that allows the
old compatibility layer to work in Access 2000 and beyond.

For more information on converting Access 97 to later versions, see:
http://allenbrowne.com/ser-48.html
The article explains:
- setup issues,
- conversion issues,
- usability issues,
- useful new features, and
- choosing file formats.
 
W

wysiwyg

Thanks for the reply Allen, good info in your article.

This is the part that concerns me:
If it contains a reference to:
Microsoft DAO 2.5/3.5 Compatibility Layer
you will need to remove that library, and re-write affected code before you
convert.

There is no code in the database except what Access generated for the
switchboard. If one is not a programmer, how would one know how to re-write
the affected code?? Is it safe to say that for each line that is
highlighted as offending in the code window, that I add DAO (i.e, change Dim
dbs as Database to Dim dbs as DAO.Database)?

I appreciate your help!
 
A

Allen Browne

The first thing is to resolve any issue with the references themselves. See:
http://allenbrowne.com/ser-38.html

Once you do have the DAO 3.6 library referenced, and you do not have the ADO
library referenced, you may find the code will compile.

It won't hurt to do a search'n'replace on:
As Database
to:
As DAO.Database

More importantly, replace:
As Recordset
with:
As DAO.Recordset

Other potential candidates include Parameter, Field, and Property.
 
W

wysiwyg

I'll try that. Thanks again!


Allen Browne said:
The first thing is to resolve any issue with the references themselves. See:
http://allenbrowne.com/ser-38.html

Once you do have the DAO 3.6 library referenced, and you do not have the ADO
library referenced, you may find the code will compile.

It won't hurt to do a search'n'replace on:
As Database
to:
As DAO.Database

More importantly, replace:
As Recordset
with:
As DAO.Recordset

Other potential candidates include Parameter, Field, and Property.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.
database
 

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