M
Marc Olivier Goyette
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
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