PRB: Error 13 Type Mismatch Error on DAO OpenRecordset MethodLast reviewed: March 4, 1998Article ID: Q181542 |
The information in this article applies to:
SYMPTOMSIf you dimension an object as a Recordset and then set that object to databaseobject.OpenRecordset(source), you may get the following error message:
Run time error '13': Type mismatch CAUSEIf your project contains references to both the Data Access Objects (DAO) library and the ActiveX Data Objects (ADO) library, you may see multiple Recordset entries in the list box when you dimension the Recordset object. This error occurs when you list the ADO library with a higher priority than the DAO library in the References dialog box, regardless of which Recordset entry you select from the list box.
RESOLUTIONIf you need only the DAO Recordset object, make sure that the reference for the DAO object library has a higher priority in the References dialog box, or clear the reference to Microsoft ActiveX Data Objects. If you need to reference and use both DAO and ADO Recordset objects, dimension the objects explicitly as follows:
DIM adoRS As ADODB.Recordset DIM daoRS As DAO.Recordset MORE INFORMATION
Steps to Reproduce Behavior
|
Additional query words: OpenRecordset DAO mismatch
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |