Microsoft KB Archive/249350
Article ID: 249350
Article Last Modified on 4/29/2007
- 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 OLE DB Provider for Jet 3.51
- Microsoft OLE DB Provider for Jet 4.0
- Microsoft Visual Basic 6.0 Professional Edition
- Microsoft Visual Basic 6.0 Enterprise Edition
This article was previously published under Q249350
The following error messages occur:
This problem occurs with the Jet Provider and does not occur with the SQL Server Provider. The problem also does not reproduce with client-side cursors.
The problem doesn't seem to be in the ADODC itself, because you can bind the controls directly to a Recordset object and click on a MoveNext command button to cause the problem.
The resolution is to issue a Recordset.Move 0 method in one of the events in the TextBox control.
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in the latest service pack for Visual Studio 6.0.
For additional information about Visual Studio service packs, click the following article numbers to view the articles in the Microsoft Knowledge Base:
194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why
194295 How to tell that a Visual Studio service pack is installed
To download the latest Visual Studio service pack, visit the following Microsoft Web site:
Steps to Reproduce Behavior
- Create a new project and add the ADO Data control and the DataGrid (OLE DB) control to the components.
- Add a TextBox, a DataGrid, a CommandButton, and an ADO Data control to the form.
- Set the connection string on the ADO Data control to use the JET 4.0 OLEDB provider and then choose the Northwind database.
Add the following code to the project:
Dim rs As ADODB.Recordset Private Sub Form_Load() Set rs = New ADODB.Recordset rs.CursorLocation = adUseServer rs.ActiveConnection = Adodc1.ConnectionString rs.Properties("IRowsetIdentity") = True rs.Open "SELECT * FROM Customers", _ , adOpenKeyset, adLockOptimistic, adCmdText Set Adodc1.Recordset = rs Set DataGrid1.DataSource = Adodc1 Text1.DataField = "CompanyName" Set Text1.DataSource = Adodc1 End Sub Private Sub Command1_Click() rs.MoveNext End Sub
- Run the program.
- In the Grid, select an entire row about four lines down. Be sure to click on the Button column on the left so that you select the entire row.
- Edit the text in the TextBox (not in the Grid).
- In the Grid, select another entire row about four more lines down.
- Edit the text in the TextBox.
- Click on the Move Next button, and note that you get the error messages listed in the "Symptoms" section of this article.
Keywords: kbbug kbdatabase kbfix kbjet kbmdacnosweep kbvs600sp4fix kbvs600sp5fix KB249350