Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: VB6
Expertise: beginner
May 13, 2000



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Unrecognized Database Format Error Message with Access 2000 Databases

The standard DAO Data control is designed to work with the Jet 3.5 Engine, whereas Access 2000 database can be accessed only by the more recent Jet 3.6 engine. For this reason, any attempt to access an Access 2000 database using the standard DAO Data control, as well as regular DAO commands, is doomed to failure and will raise run-time error 3343 "Unrecognized Database Format".

The only way to work around this issue is to open manually the database using the Microsoft DAO 3.6 Object Library, instead of the older Microsoft DAO 3.51 Object Library. If you are working with a Data control you can open the desire Recordset and assign it to the Recordset property of the Data control, as in:

' this code assumes that you added a reference
' to the Microsoft DAO 3.6 Object Library
Dim db As Database, rs As Recordset
Set db = DBEngine.OpenDatabase("c:\data\yourdb.mdb")
Set rs = db.OpenRecordset("TableName")
Set Data1.Recordset = rs
If you're accessing the Access 2000 database using ADO or the ADO Data control, you can get a run-time error -2147467259 "Unrecognized Database Format" if you use the Microsoft.Jet.OLEDB.3.51 provider, which is the OLEDB provider that is automatically installed with VB. You can fix this error by simply upgrading to the Microsoft.Jet.OLEDB.4.0 provider.
Francesco Balena
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date