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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim HornMicrosoft SQL Server Data DudeCommented:
What is your parConnStr?
psokoloAuthor Commented:
Jim HornMicrosoft SQL Server Data DudeCommented:
(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.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

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 ?
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.