L
Leif
I'm trying to make Doug Steel's DSN-Less code work for an Oracle connection
via an MS driver. My connection string looks like:
tdfCurrent.Connect = "ODBC;" & _
"Driver={Microsoft ODBC for Oracle};" & _
"Server=DSLARCM1;" & _
"Database=merp;" & _
"Uid=myUid;" & _
"Pwd=myPwd"
I'm trying to convert a linked table (linked via ODBC MS Driver) to
DSN-Less. The error I get is at the statement:
dbCurrent.TableDefs.Append tdfCurrent
The error is
"ODBC--connection to '{Microsoft ODBC for Oracle}DSLARCM1' failed. (3151
encountered"
However, if I use the Oracle driver for Oracle it works. The connection
string is:
tdfCurrent.Connect = "ODBC;" & _
"Driver={Oracle ODBC Driver};" & _
"Dbq=COMET_DSLARCM1_MERP.WORLD;" & _
"Uid=myUid;" & _
"Pwd=myPwd"
The TNSnames.ora entry looks like:
COMET_DSLARCM1_MERP.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (COMMUNITY = tcp.world)(PROTOCOL = TCP)(Host =
dslarcm1)(Port = 1521))
(ADDRESS = (COMMUNITY = tcp.world)(PROTOCOL = TCP)(Host =
dslarcm1)(Port = 1526))
)
(CONNECT_DATA =
(SID = merp)
)
)
However, few people have the Oracle driver, most have the MS driver, so I
would prefer to set it up to use the MS driver.
Regards,
Leif Eriksen
via an MS driver. My connection string looks like:
tdfCurrent.Connect = "ODBC;" & _
"Driver={Microsoft ODBC for Oracle};" & _
"Server=DSLARCM1;" & _
"Database=merp;" & _
"Uid=myUid;" & _
"Pwd=myPwd"
I'm trying to convert a linked table (linked via ODBC MS Driver) to
DSN-Less. The error I get is at the statement:
dbCurrent.TableDefs.Append tdfCurrent
The error is
"ODBC--connection to '{Microsoft ODBC for Oracle}DSLARCM1' failed. (3151
encountered"
However, if I use the Oracle driver for Oracle it works. The connection
string is:
tdfCurrent.Connect = "ODBC;" & _
"Driver={Oracle ODBC Driver};" & _
"Dbq=COMET_DSLARCM1_MERP.WORLD;" & _
"Uid=myUid;" & _
"Pwd=myPwd"
The TNSnames.ora entry looks like:
COMET_DSLARCM1_MERP.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (COMMUNITY = tcp.world)(PROTOCOL = TCP)(Host =
dslarcm1)(Port = 1521))
(ADDRESS = (COMMUNITY = tcp.world)(PROTOCOL = TCP)(Host =
dslarcm1)(Port = 1526))
)
(CONNECT_DATA =
(SID = merp)
)
)
However, few people have the Oracle driver, most have the MS driver, so I
would prefer to set it up to use the MS driver.
Regards,
Leif Eriksen