Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing multiple versions of Access

Status
Not open for further replies.

Navel12

Programmer
Feb 21, 2003
17
US
I am developing a VB6 application that will need to access Access 97 and Access 2000. Is there a clean way to accomplish this?
 

Yes, you can use the same methods that you use to access the 2k on the 97 whether it is DAO or ADO.

if you search this site you will find all the info you need.

Good Luck

 

Use the highest JET version.

DAO 3.5x can access a JET 3, and lower, mdb
DAO 3.6 can access a JET 4, and lower, mdb


For ADO there is an (old) provider for JET 3.51, and one for JET 4.


So, if you use DAO, then use v. 3.6
If you use ADO, use the JET 4.0 provider.

If you haven't done so, then upgrade to VB6 SP5 so that DAO 3.6 and the JET 4.0 provider for ADO are available on your system (SP4 makes them available as well, but upgrade to SP5 in any case).
 

Hmmm... I could be wrong but in the past CCLINT I though I used the MSADO 2.7 Library on an Access 97 Db. Maybe it was 2.6??? I'll have to check again...

Yep...
'PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=D:\A\test.mdb;

Or is that what you were saying???

 
Yes, that is what I'm saying:
>If you use ADO, use the JET 4.0 provider.

I didn't mention that the ADO version was relevant - just the provider version. You can use ADO 2.x for instance, with the JET 3.51 or JET 4 provider. But only the JET 4 provider can open the JET 3 and JET 4 mdb.

It's not the ADO library that really matters, but the availability of the provider version.

The JET 4 provider came first with ADO 2.1 (if I remember right - doesn't matter)
So, as long as you have this provider, you can use it with ADO 2.1 and higher.
And because the JET provider is backward compatible, you can use it on JET 2, 3 and 4 MDBs, and more.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top