access 97 databases are based on the older microsoft jet 3.5 engine.
access 2000 uses the newer 3.6 version of the jet database. Jet 3.5
uses DAO 3.51 and Jet 3.6 uses DAO 3.6.
What you need to do is create a reference to the MS DAO 3.6 and then
explicitly open your recordset:
Dim db As Database, rs As Recordset
Set db = DBEngine.OpenDatabase("c:\yourpath\yourdata.mdb")
Set rs = db.OpenRecordset("YourTable")
Set Data1.Recordset = rs
If you are using the ADO control that comes installed with vb6 then
upgrade to microsoft jet oledb 4.0 and it should just start working.
regards,
John
jobrien at acscience dot com
disclaimer: this answer was regurgitated from various sources and is
in no way a product of my own imagination.
"Dan Shelby" <daniel.shelby (AT) cox (DOT) net> wrote
Quote:
I would like to open an Access2000 database file in Visual Basic 6. When I
try it tells me that the database is in the wrong format. If I convert the
database to Access97 format, then the file opens with no problem. I have
tried the ADO route, and the DAO route, all to no avail. Obviously there is
a way to do this but I haven't been able to figure it out. Appreciate any
help you can give. Thanks. |