BUG: VB 6.0 Stops Responding if ADO DataControl References fMoreData in EndofRecordset Event (236941)



The information in this article applies to:

  • Microsoft Visual Basic Professional Edition for Windows 6.0
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • ActiveX Data Objects (ADO) 2.0
  • ActiveX Data Objects (ADO) 2.1
  • ActiveX Data Objects (ADO) 2.1 SP1
  • ActiveX Data Objects (ADO) 2.1 SP2
  • ActiveX Data Objects (ADO) 2.5
  • ActiveX Data Objects (ADO) 2.6
  • ActiveX Data Objects (ADO) 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.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new Standard EXE project.
  2. From the Project menu, choose Components and select the ADO Data Control.
  3. Place the ADO Data Control on the form.
  4. Set the ADO Data Control ADODC Connectionstring property to a valid Datasource. Also, set the Recordsource property.
  5. Place a text box on the form.
  6. Set the DataSource property of the text box to the ADO Data Control.
  7. Place the following code in the ADODC1's EndofRecordset event:
    Debug.Print fMoreData
  8. Save the Project.
  9. Close and exit Visual Basic.
  10. Start Visual Basic and reopen the Project.
  11. Press F5 to run the form.
  12. Click the Previous button on the ADO Data Control.RESULT: Visual Basic stops responding and no error appears.

Modification Type:MajorLast Reviewed:10/15/2002
Keywords:kbBug kbDatabase kbDataBinding kbDSupport KB236941 kbAudDeveloper