Connection string syntax for Classic ADO / ODBC / Oracle 10g EZConnect

后端 未结 3 2010
别跟我提以往
别跟我提以往 2021-01-04 18:31

I\'m trying to connect various VBA projects to an Oracle 10g back end using ADO (2.8) and no TNS. After various attempts, we\'ve decided that the simplest series of steps fo

3条回答
  •  遥遥无期
    2021-01-04 19:09

    Try this and replace the values as appropriate:

    Set Connection = CreateObject("ADODB.Connection")
    
    blnTest = Connection.Open("Driver={Oracle in instantclient};Dbq=127.0.0.1:1521/SERVICENAMEHERE", "USERNAME", "PASSWORD")
    

    If Oracle in instantclient doesn't work check the HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers registry key to see what the value is for the Oracle Instant Client (there may be a version number appended).

    If this still doesn't work for you. Leave a comment with the details of what happened and I'll try to adjust the answer for you.

提交回复
热议问题