ODBC does not support the requested properties

Posted on 2006-04-07
Last Modified: 2010-05-03

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
Question by:psokolo
    LVL 65

    Expert Comment

    by:Jim Horn
    What is your parConnStr?

    Author Comment

    LVL 65

    Expert Comment

    by:Jim Horn
    (Potentially stupid comment)  You have a DSN named 'MyDSN', which has a user named 'MyUser', with a password of 'MyPass'? is a repository of valid connection strings that can help your format it correctly.

    Author Comment

    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.


    Author Comment

    Can I cancel this question ?
    LVL 8

    Accepted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Suggested Solutions

    Title # Comments Views Activity
    Help in WHSCRIPT 9 31
    String manipulation in Visual Basic 7 33
    using Access 8 38
    VBA filters 2 22
    Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
    Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now