Discussion Locked

Converting Access 97 to 2000 & VB projec

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am working on migrating a VB 5 project which creates an Access 97 database (this is based on another Access 97 template) to VB 6 to create an Access 2000 database. After fixing code in VB 6, Access 97 keeps getting created instead of 2000. Anyone know why?

7 replies

by mark fenwick

The version of DAO installed on the system you are running on the program on is probably version 3.51. DAO 3.6 allows you to create Access 97 or 2K databases and creates Access 2000 databases by default.

You can update to DAO 3.6 by installing any version of Microsoft's Data Access Components (MDAC) newer than 2.0.

The current version of MDAC is version 2.6 and you download it from:

http://www.microsoft.com/data

Hope this helps

by techie353

This is true that I would need to update to DAO 3.6 by using Microsoft Service Pack 4. I installed this but now I am getting "Method or data member not found" on this line:

SupMonO.FindFirst criteria <--- on FindFirst, it is a valid Recordset method, but I do not see it as a member in the Object Browser.

Can you help?

by donq

Access 97, and not Access 2000 is installed on the machine you are using to create your build?

Why do VB guys avoid using Access straight up so consistently? It's a MUCH FASTER stand-alone database development tool employing VBA.

by mark fenwick

I have just checked my DAO 3.6 library and FindFirst is listed as a method of the RecordSet object, so I am not sure why you can not see it.

Try a later version of MDAC, I think SP4 installed MDAC 2.0.

I cant help much more without knowing more as I never use FindFirst, it makes your code limited to DAO and does not scale well.

A better, and more future proof, method would be to consider converting your criteria to a valid SQL string and use this to open the RecordSet.

Testing if the RecordSet is empty would equate to the FindFirst function. The advantage being if that you only hit the databaase once to retrieve all your information.

Also this method makes converting you code to ADO much easier. In fact now that ADO comes with the JRO object I dont use DAO in any new projects.

by techie353

The recordset in declarations section when updating in VB6 should have a prefix of DAO. (e.g. Private rs As DAO.Recordset). Modify all recordsets to have the DAO prefix and you should see any method using the recordset will be recognized.

This discussion is closed to new replies.