Article ID: 222145 - Last Review: August 23, 2001 - Revision: 1.1 PRB: ADO Data Control Events May Generate a Compilation ErrorThis article was previously published under Q222145 On This PageSYMPTOMS
If you are using the ADO Data Control events in a Visual Basic 6.0 project and you reference ADO 2.1 or later, the following compile error occurs:
Compile Error: Procedure declaration does not match description of event or procedure having the same name. EndOfRecordset FieldChangeComplete MoveComplete RecordChangeComplete RecordsetChangeComplete WillChangeField WillChangeRecord WillChangeRecordset WillMove The above events all use the ADODB.Recordset parameter within the declaration. For example: The ADO Data Control event WillMove declaration is: CAUSE
The interfaces in ADO 2.1 and later have been changed from ADO 2.0. There is no issue with interface changes unless a control is compiled using an older version of ADO. This is the case with the ADO data control. See the "More Information" section for details.
RESOLUTION
To make the ADO Data Control events work with ADO 2.1 or later, the declaration of the event has to be changed to include: STATUS
This behavior is by design.
MORE INFORMATION
The ADO Data control is part of Visual Basic 6.0 and was compiled using MDAC 2.0, which was included with Visual Basic 6.0. To use the ADO data control with MDAC 2.1 or later, make the changes to the event declarations as noted in the "Resolution" section of this article.
Steps to Reproduce Behavior
REFERENCESFor additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
257714
(http://support.microsoft.com/kb/257714/EN-US/
)
FIX: ADO DataControl and DataEnvironment Events Only Work with ADO 2.0
APPLIES TO
| Article Translations
|
Back to the top
