Good morning,
I have a linked table inside my mdb, using an
odbc driver that links to my Oracle 8 server.
Now when I try to programatically connect to
my linked table I get the error "ODBC - Connection to test Failed" despite the fact my odbc driver is properly configured and when I manually try to open the link it works just fine.
Kindly see me code below :
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Set db = CurrentDb()
Set tdf = db.CreateTableDef("ORION_PS_STAGING_DATA")
tdf.SourceTableName = "ORION_PS_STAGING_DATA"
tdf.Connect = "ODBC;DATABASE=scd;UID=orion;PWD=orion;DSN= oriontest;"
db.TableDefs.Append tdf
db.TableDefs.Refresh
Set tdf = Nothing
Set db = Nothing
I have a linked table inside my mdb, using an
odbc driver that links to my Oracle 8 server.
Now when I try to programatically connect to
my linked table I get the error "ODBC - Connection to test Failed" despite the fact my odbc driver is properly configured and when I manually try to open the link it works just fine.
Kindly see me code below :
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Set db = CurrentDb()
Set tdf = db.CreateTableDef("ORION_PS_STAGING_DATA")
tdf.SourceTableName = "ORION_PS_STAGING_DATA"
tdf.Connect = "ODBC;DATABASE=scd;UID=orion;PWD=orion;DSN= oriontest;"
db.TableDefs.Append tdf
db.TableDefs.Refresh
Set tdf = Nothing
Set db = Nothing