ODBC driver does not support the requested properties

G

Guest

Hi

I built a code that executes an SQL code over an ODCB connection. My problem is that this code is working well on my computer but isn't working on 6 others similar(should be exactly the same computer but it is not since I got this problem...) computer that I tried my code

The same driver is installed on all machines (Client Access ODBC Driver (32-bit) v 7.00.00.00). And on my machine eiter I set the source database or not won't change anything since it is hard code

Also, I am able to connect on the AS400 table, the problem is to retrieve the data. The regional setting is the same on every computer

Error message at the line : -2147217887-ODBC driver does not support the requested propertie

Sub TestDataSourceUsingADO(
Dim conn As Objec
Dim rcset As Objec
Dim connstr As Strin
Dim sqlstr As Strin

Dim userID As Strin
Dim pwd As Strin

userID = "username"
pwd = "password"

On Error GoTo errHandle
Set conn = CreateObject("ADODB.Connection"
connstr = "DRIVER={Client Access ODBC Driver (32-bit)};SYSTEM=10.10.16.91;DBQ=AS400

conn.Open connstr, userID, pw

Set rcset = CreateObject("ADODB.Recordset"
sqlstr = "SELECT * FROM CANADA.KB4400CSTM.FCMSFC54C FCMSFC54C

rcset.Open sqlstr, conn, 1,

If Not rcset.EOF The
MsgBox rcset.Fields(0).Name & "-" & rcset.Fields(0).Valu
End I

exitSub
rcset.Close: Set rcset = Nothin
conn.Close: Set conn = Nothin
Msgbox "Your data connection is working.",vbokonly+vbinformation,"Info
errHandler
MsgBox Err.Number & "-" & Err.Description, vbOKOnly + vbExclamation, "Error
End Su

Thanks For your Hel

Marc
 
K

kkknie

Could it be different versions of ADO? I've tried to with a referenc
to ADO 2.6 on an older box and it didn't work. Had to go all the wa
back to 2.1.

Another question, do you get the error on the conn.Open method or th
rcset.Open method?
 
G

Guest

K

I got the error at the rcset.open line

How do I uninstall the ADO that I have ? I'm not sure I understand everyting about ADO. I have update all the MDAC 2.8 on all PC to be sure that this wasn't the problem

Thanks for your inpu

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top