vba - How to specify "Service Name" in Oracle ODBC connection string -
vba - How to specify "Service Name" in Oracle ODBC connection string -
i have excel macro has oracle database connection. when phone call macro, fills out user name , password not service name. user has come in service name manually every time.
how can specify in connection string?
connection string:
cn.odbcconnection.connection = _ "odbc;driver={oracle in oraclient11g_home2};" & _ "uid=" & inputuser & ";pwd=" & inputpassword & ";" & _ "host=" & inputhost & ";port=1521;db=" & inputhost & ";" & _ "defaultisolationlevel=readuncommitted" excel prompt:
it depends on driver, check out
but without config file, have specify options in connection string. give try,
cn.odbcconnection.connection = _ "odbc;driver={oracle in oraclient11g_home2};" & _ "service_name=" & inputhost & ";uid=" & inputuser & ";pwd=" & inputpassword & ";" & _ "host=" & inputhost & ";port=1521;" & _ "defaultisolationlevel=readuncommitted" also, create sure inputhost should used in both cases currently. 1 should instance of server other beingness database within it.
vba excel-vba odbc connection-string
Comments
Post a Comment