Link to home
Start Free TrialLog in
Avatar of montrof
montrofFlag for United States of America

asked on

VBA connection string to Oracle

I am trying to connect to Oracle through VBA.  I have an ODBC connection setup and it works but when I try to connect through vba it will not connect. The ODBC connection is called BBProd and using the Oracle in OraClient11g_home1 Driver.  

Here is my connection string vba
cn.ConnectionString = "Driver={Oracle in OraClient11g_home1}; " & _
         "CONNECTSTRING=(DESCRIPTION=" & _
         "(ADDRESS=(PROTOCOL=TCP)" & _
         "(HOST=MyHOst)(PORT=1506))" & _
         "(CONNECT_DATA=(SERVICE_NAME=My_Service_Name))); uid=UID;pwd=Password;"

Open in new window


Thanks,
Montrof
ASKER CERTIFIED SOLUTION
Avatar of Kanti Prasad
Kanti Prasad

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of montrof

ASKER

It still will not connect I have built several connection before to SQL Server with no problem but I cannot get this one to work.
Avatar of montrof

ASKER

I am getting the following error [Microsoft][ODBC Driver Manager] The Specific DSN contains an acrhitecture mismatch between the driver and Application
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial