• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 300
  • Last Modified:

ODBC does not support the requested properties

Hello,

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
0
psokolo
Asked:
psokolo
  • 3
  • 2
1 Solution
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
What is your parConnStr?
0
 
psokoloAuthor Commented:
DSN=MyDSN;uid=MyUser;password=MyPass
0
 
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.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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.


0
 
psokoloAuthor Commented:
Can I cancel this question ?
0
 
dds110Commented:
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.

HTH

if you still want to cancel the question, post a request in the community help TA.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now