PRB: Getting Unrecognized Database Format Error Message When Upgrading to Access 2000
ID: Q238401
|
The information in this article applies to:
-
Microsoft Visual Basic Professional and Enterprise Editions for Windows, versions 5.0, 6.0
-
Microsoft Access 2000
SYMPTOMS
If you try to gain access to an Access 2000 database, you might experience one of the following errors within your Visual Basic program:
If you are using ADO (or the ADO Data Control):
Run-time error -2147467259 Unrecognized Database Format XXX
If you are using DAO (or the DAO generic Data Control):
Run-time error 3343 Unrecognized Database Format XXX
CAUSE
Access 2000 uses the Jet 4.0 engine, which creates Jet 4.0 format database files. Jet 3.50 components would not recognize such a format.
- If you are using ADO, you get error -2147467259 when you try to connect to your Access 2000 through the "Microsoft.Jet.OLEDB.3.51" provider.
- If you are using DAO, you get error 3343 above when you use the "Microsoft DAO 3.51 Object Library."
- The DAO generic Data-Control does not work against Access 2000 databases, and always generates error 3343 unless used as instructed in the RESOLUTION section of this article. This occurs because this control is based on Jet 3.51 and only recognizes Jet 3.51 (or before) database formats.
RESOLUTION
- For ADO (or the ADO Data Control), use the "Microsoft.Jet.OLEDB.4.0" provider.
- For DAO, go to Project menu, and choose References to use the "Microsoft DAO 3.6 Object Library."
- If you use the generic Data-Control, you need to open a DAO 3.6 recordset and then assign it to be the source of the Data Control as follows:
Option Explicit
Private daoDB36 As Database
Private rs As DAO.Recordset
Dim sPath As String
Private Sub Form_Load()
sPath = _
"C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb"
Set daoDB36 = DBEngine(0).OpenDatabase(sPath)
Set rs = daoDB36.OpenRecordset("Customers")
Set Data1.Recordset = rs
End Sub
STATUS
This behavior is by design.
REFERENCES
For more information on Jet 4.0, refer to the Access 2000 documentation.
For more information on ADO and DAO, refer to the Visual Basic documentation.
For more information on "Unrecognized Database Format," query on this in the MSDN Library supplied with Visual Basic.
© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Ammar Abuthuraya, Microsoft Corporation
Additional query words:
Keywords : kbAccess kbADO kbCtrl kbDAO kbJET kbOLEDB kbVBp500 kbVBp600 kbGrpVBDB kbGrpMDAC
Version : WINDOWS:2000,5.0,6.0
Platform : WINDOWS
Issue type : kbprb