Microsoft KB Archive/236941

= BUG: VB 6.0 Stops Responding if ADO DataControl References fMoreData in EndofRecordset Event =

Article ID: 236941

Article Last Modified on 10/15/2002

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition
 * Microsoft ActiveX Data Objects 2.0
 * Microsoft ActiveX Data Objects 2.1
 * Microsoft ActiveX Data Objects 2.1 Service Pack 1
 * Microsoft ActiveX Data Objects 2.1 Service Pack 2
 * Microsoft ActiveX Data Objects 2.5
 * Microsoft ActiveX Data Objects 2.6
 * Microsoft ActiveX Data Objects 2.7

-



This article was previously published under Q236941



SYMPTOMS
When the fMoreData argument is referenced in the DataControls EndofRecordset method, if you are sitting on the first record in the RecordSet, Visual Basic stops responding. If you are using Visual Basic 6.0 Service Pack 4, an application error occurs.



RESOLUTION

 * Do not reference fMoreData in code. -or-


 * Do not use the DataControl. Instead use ActiveX Data Objects (ADO) code, declaring your recordset using WITHEVENTS.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce Behavior
 Create a new Standard EXE project. From the Project menu, choose Components and select the ADO Data Control. Place the ADO Data Control on the form. Set the ADO Data Control ADODC Connectionstring property to a valid Datasource. Also, set the Recordsource property. Place a text box on the form. Set the DataSource property of the text box to the ADO Data Control.</li>  Place the following code in the ADODC1's EndofRecordset event: Debug.Print fMoreData </li> Save the Project.</li> Close and exit Visual Basic.</li> Start Visual Basic and reopen the Project.</li> Press F5 to run the form.</li> Click the Previous button on the ADO Data Control.RESULT: Visual Basic stops responding and no error appears.</li></ol>

Keywords: kbbug kbdatabinding kbdatabase kbpending KB236941

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.