Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to connect Excel VBA to Oracle 18c XE ?

User_IKOCLJul 6 2021

I've installed Oracle 18c XE.
I can connect with SQLPUS using the following:
sqlplus maximo/maximo@XEPDB1

But I can't connect with Excel VBA suing any of the following:

strConn = "Driver={Microsoft ODBC for Oracle};" & _
"CONNECTSTRING=(DESCRIPTION=" & _
"(ADDRESS=(PROTOCOL=TCP)" & _
"(HOST=DESKTOP-9O1DB17)(PORT=1521)" & _
"(CONNECT_DATA=(SID=XEPDB1))); uid=maximo; pwd=maximo;"
cn.Open (strConn)

or

strConn = "Driver={Microsoft ODBC for Oracle};Server=DESKTOP-9O1DB17; Database=XEPDB1; user id=maximo;password=maximo;"
cn.Open (strConn)

or

strConn = "Driver={Oracle in OraClient18c_home1};DBQ=XEPDB1; Uid=maximo;Pwd=maximo;"
cn.Open (strConn)

I've installed the instant client 18_5 on:
E:\Oracle\Product\instantclient_18_5

Iv' added the following environment variables:
image.png
I've installed the following ODBC driver:
image.png
But I'm still having the error:
image.pngTranslation : [Microsoft][ODBC driver management]Can't find datasource and driver name not specified.

Could you help me

Thank you

Comments

Post Details

Added on Jul 6 2021
1 comment
231 views