PRB: Data Control Only Displays Updated Data when Single-Stepping Through Code

ID: Q248833


The information in this article applies to:
  • Microsoft Visual Basic Professional and Enterprise Editions for Windows, versions 5.0, 6.0


SYMPTOMS

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.


CAUSE

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:

Q216925 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.


RESOLUTION

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 


STATUS

This behavior is by design.

Additional query words: kbdsupport kbgrpmdac kbgrpvbdb

Keywords : kbDatabase kbJET kbGrpVBDB kbDSupport
Version : WINDOWS:5.0,6.0
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: December 28, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.