I had the same problem and I managed a workaround whereby I copied the
original rs into a new rs, with the proper adOpenKeySet Cursor, via the
ADO Stream object. Like so:
Set objStream = New ADODB.Stream
objRset.Save objStream
Set objRsetCopy = New ADODB.Recordset
objRsetCopy.Open objStream, , adOpenKeyset
It worked. And the other nice thing was I now had a rs that exposed
properties like RecordCount, which the Access ODBC driver unfortunately
doesn't want to provide.
One note though. You *must* to use the Stream object workaround. If you
are thinking about using the Clone method to copy the recordset, read this
article for details about why this is a bad idea:
http://www.vbrad.com/pf.asp?p=Source/src_clone_rs_data.htm
Arrh,
> I've got a stored procedure in access 2000 that does a select on a
table.
> Sometimes the select doesn't return any rows so I will get this error:
> =========
> ADODB.Recordset error '800a0bcd'
>
> Either BOF or EOF is True, or the current record has been deleted.
> Requested operation requires a current record.
> =========
>
> So what I need to do is see if there are any rows in the recordset. When
I
> check the recordcount property I get the infamous -1. I know about
> changing the curser to adOpenKeyset when my query is in the asp page
> itself, but how do I change the curser for a stored procedure?
>
> When I try using:
>
> If not Articles.EOF then
> ' No records
> Else
> ' There are records
> End if
>
> I get this error, I'm assuming because of the curser the stored
procedure
> is using.
>
> ============
>
> Microsoft OLE DB Provider for ODBC Drivers error '80040e18'
>
> Rowset position cannot be restarted.
> ============
>
> Thanks for any help.
> Ric