Microsoft KB Archive/294139

= PRB: Errors Occur with Forward-Only Server-Side Cursor When You Use ADO Recordset Find =

Article ID: 294139

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Data Access Components 2.5
 * Microsoft Data Access Components 2.6
 * Microsoft Data Access Components 2.7

-



This article was previously published under Q294139



SYMPTOMS
When you use the adUseServer cursor location with the default Firehose cursor (Forward-Only, Read-Only cursor), the following error is generated when you use the Recordset.Find command:

Run-time error '-2147217879 (80040e29)': Rowset does not support scrolling backward.



RESOLUTION
Use the client-side cursor location, so that a Static cursor is created, which allows backward scrolling. You can use the server-side static/keyset/dynamic cursor, but you cannot use the server-side Forward-Only cursor in this scenario, because it does not support backward scrolling.



STATUS
This behavior is by design.



Steps to Reproduce Behavior
Use the following Microsoft Visual Basic code to reproduce this problem. Make sure that Microsoft ActiveX Data Objects is selected in the Project ... References dialog box. This code connects to a SQL Server database. Private Sub cmdTestIt_Click Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset Dim txtID As String cn.ConnectionString = &quot;provider=sqloledb;data source=YourSQLServer;initial catalog=northwind;User ID=YourUserID;Password=YourPassword&quot;

' Uncomment the line below to correct the problem ' cn.CursorLocation = adUseClient cn.Open Set rs = cn.Execute(&quot;SELECT * FROM Customers&quot;) rs.Find &quot;CustomerID='&quot; & rs!CustomerID & &quot;'&quot; Debug.Print rs.EOF rs.Close cn.Close End Sub

Additional query words: Find ForwardOnly scrolling

Keywords: kbdatabase kbprb KB294139

-

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

© Microsoft Corporation. All rights reserved.