Re: Rowset position cannot be restarted error



>I want to open a recordset based on a SP but need to move forwards and
>backwards through the recordset. When I use the code below I get a forward
>only recordset.

Yes it will do. All Recordsets returned from a Command Object are read-only.
They are ForwardOnly if the default Cursor Location on the Connection is
Server-sided
They are Static if the default Cursor Location on the Connection is
Client-sided
A 2nd method has to be used.

> I have tried opening the recordset but this doesn't work.

"doesn't work" is a bad thing to say. Totally non-descriptive.
Everybody in response is going to say, "How doesn't it work? What are the
symptoms? Are there any error messages? If so, what?"
Nobody has any idea how it fails (does not compile, does not link, error
message at run time - (if so what?), etc).

As it stands you were on the right track. Opening the Command Object as
Recordset Source is correct. But
The Recordset's Connection property _must_ be UNspecified
The Command's Connection property _must_ be specified
The Recordset gets it's connection from the Command object.

Stephen Howe


.



Relevant Pages

  • Re: ADO Properties
    ... ADO.NET has same objects like Connection, Command object as ADO does. ... there is Dataset in place of Recordset. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Updating Access data using SQL / refresh time question
    ... As a test today, for one poarticular recordset, I changed from DAO to ADO to ... > I forgot to mention that the expense of repeated connection open and close ... > dim oconn as new adodb.connection ... > 'Now load the listview by looping through each RS row ...
    (microsoft.public.vb.database)
  • Re: Updating Access data using SQL / refresh time question
    ... > I forgot to mention that the expense of repeated connection open and close ... > dim oconn as new adodb.connection ... > 'Now load the listview by looping through each RS row ... > ' Set the recordset object each time we load the listview ...
    (microsoft.public.vb.database)
  • Re: Problem: MDB-Datenbank Zugriff über das Intranet
    ... Wie und wo öffnest Du Deine Connection zur *.mdb? ... > End With ... Du öffnest ein Recordset mit adOpenForwardOnly. ... Datensatz liegenden Datensatz zuzugreifen. ...
    (microsoft.public.de.vb.datenbank)
  • Re: ASP - FROM statement slows down connection to database
    ... Open your database in Access, switch to the Queries tab, create a new query ... in Design View without choosing a table, swtich to SQL View, paste the sql ... connection string rather than using an ... recordset open statements. ...
    (microsoft.public.inetserver.asp.db)