I'm trying to connect my Excel to Oracle with this connection string in VBA:
And I get error msg below:
Run-time error '-2147467259 (800004005)': ORA-12154: TNS:could not resolve the connect identifier specified
Using: - Excel 2016 64-bit - Windows 10 64 bit - Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit - PL/SQL Release 12.1.0.2.0 - CORE 12.1.0.2.0 - TNS for Linux: Version 12.1.0.2.0 - NLSRTL Version 12.1.0.2.0
Excel 64-bit & oracle is provided by company, hope can settle it without change excel to 32-bit. Any help will be appreciated. I actually already tried to settle it for two days and see no hope at all. Thanks for your time.
Not sure if is the driver i used is 32-bit? Microsoft ODBC for Oracle, MSORCL32.DLL Oracle in Client_11_Std_x86_1, SQORA32.DLL
Dim cnPubs As ADODB.connection
Set cnPubs = New ADODB.connection
Dim strConn As String
With cnPubs
strConn = "Provider=OraOLEDB.Oracle;" & _
"Data Source=" & sSource & ";" & _
"User ID=" & sAC & ";Password=" & sPW & ";"
.Open strConn
.CommandTimeout = 0
End With