Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.data.odbc,microsoft.public.excel.programming,microsoft.public.excel.sdk,microsoft.public.office.developer.vba
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? -- Message posted from http://www.ExcelForum.com |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Oracle ODBC Driver Errors | Excel Discussion (Misc queries) | |||
Driver doesn't support the version of ODBC behaviour | Excel Discussion (Misc queries) | |||
Free XML ODBC driver for EXCEL | Excel Discussion (Misc queries) | |||
ODBC Driver/Import Data | Excel Discussion (Misc queries) | |||
xl odbc driver, Excel 2003 | Setting up and Configuration of Excel |