Microsoft KB Archive/248833
Article ID: 248833
Article Last Modified on 7/28/2003
- Microsoft Visual Basic 5.0 Professional Edition
- Microsoft Visual Basic 6.0 Professional Edition
- Microsoft Visual Basic 5.0 Enterprise Edition
- Microsoft Visual Basic 6.0 Enterprise Edition
This article was previously published under Q248833
When you run an application, updates made to an .mdb file are not visible when you refresh the intrinsic Visual Basic DAO Data Control. When you single-step through the code, the changes show up in the Data Control.
Your code and the data control are instantiating two different versions of the Microsoft Jet database engine and you experience symptoms similar to those described in the following Knowledge Base article: For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
216925 PRB: Single-User Concurrency Problems With ADO and Jet
With DAO and the DAO data control, this is caused by having the Microsoft DAO 3.5 (or 3.51 or 2.5/3.5 Compatibility) library lower in the list of type library references than another type library that defines a Database and recordset object for a different version of Microsoft Jet database engine. The effect of this is to cause two different versions of Microsoft Jet database engine to be loaded.
Move the Microsoft DAO 3.51 type library up in priority to just under the Visual Basic type libraries.
You should also be able to work around the problem by declaring an unambiguous variable type, such as DAO.Database and DAO.Recordset instead of database and recordset:
Dim db As DAO.Database, rs As DAO.Recordset
This behavior is by design.
Keywords: kbdatabase kbjet kbprb kbmdacnosweep KB248833