BUG: Data Control Errors Do Not Populate Error Object
Article ID: 129799
Article Last Modified on 12/9/2003
APPLIES TO
- Microsoft Visual Basic 4.0 Standard Edition
- Microsoft Visual Basic 4.0 Professional Edition
- Microsoft Visual Basic 4.0 Professional Edition
- Microsoft Visual Basic 4.0 16-bit Enterprise Edition
- Microsoft Visual Basic 4.0 32-Bit Enterprise Edition
This article was previously published under Q129799
SYMPTOMS
A "Type Mismatch" error is generated when a control is bound to a field
with an incompatible type, but the Error object is not populated when it is
examined in the Data Control Error event.
CAUSE
This is a limitation of the Data Control in Visual Basic version 4.0. When
the DAO generates an error, the Error object is cleared when the Error
event for the Data Control is fired.
RESOLUTION
For more information, search for the "Trappable Data Access Errors" in the
Help menu when building your error handling code.
You are not prevented in any way from writing the exact same error handling
code you would have written previously. Note that the error number passed
as a parameter to the Data Control's Error will be correct. Only the Error
object is affected. Also, most error checking in the DAO will be
unaffected. If a Field or Database object generates the error, then the
Error object is properly populated.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article. We are researching this problem
and will post new information here in the Microsoft Knowledge Base as it
becomes available.
Additional query words: 4.00 buglist4.00 vb4win vb4all
Keywords: kbbug KB129799