ODBC does not support the requested properties


I have a problem with ADO. I am trying to get a recordset from DB thru Sp, ADO however when I try to populate a recordset I get an error : "ODBC does not support the requested properties".  I need to be able to scroll the recordset back and forth.

Here is the code I am using :

Dim lConn As ADODB.Connection
Dim lRst As ADODB.Recordset
Dim lCmd As ADODB.Command

On Error GoTo MyErr

Set lCmd = New ADODB.Command
Set lRst = New ADODB.Recordset
Set lConn = New ADODB.Connection
lConn.Open parConnStr

With lCmd
    .ActiveConnection = lConn
    .CommandType = adCmdStoredProc
    .CommandText = "spSelectOwners"
    lRst.CursorType = adOpenKeyset
    lRst.Open lCmd
End With
Who is Participating?
No need to yet.

To scroll backwards through a recordset, you just need to set the "CursorType" variable to adOpenStatic or adOpenDynamic (ordinals 3 & 2 respectively)

Only with these cursor types can you use the MovePrevious method.


if you still want to cancel the question, post a request in the community help TA.
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
What is your parConnStr?
psokoloAuthor Commented:
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
(Potentially stupid comment)  You have a DSN named 'MyDSN', which has a user named 'MyUser', with a password of 'MyPass'?

http://www.connectionstrings.com is a repository of valid connection strings that can help your format it correctly.
psokoloAuthor Commented:
Obvoiusly I have exchanged the names with some samples .... the connnection string I have been using in this application for long time.... I started having troubles when I wanted to get a recordset that can go backward. So I was using collections to transport data in the app.

psokoloAuthor Commented:
Can I cancel this question ?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.