Forum Stats

  • 3,872,229 Users
  • 2,266,407 Discussions
  • 7,911,107 Comments

Discussions

How to connect Excel VBA to Oracle 18c XE ?

User_IKOCL
User_IKOCL Member Posts: 8 Green Ribbon

 

I've installed Oracle 18c XE.

I can connect with SQLPUS using the following:

sqlplus maximo/[email protected]

 

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:

 

 I've installed the following ODBC driver:


 But I'm still having the error:

Translation : [Microsoft][ODBC driver management]Can't find datasource and driver name not specified.

 

Could you help me

 

Thank you

 

Tagged:

Answers

  • User_GSQTY
    User_GSQTY Member Posts: 133 Silver Badge
    edited Jul 9, 2021 5:49PM

     [Microsoft][ODBC driver management]Can't find datasource and driver name not specified :

    Add an entry of your DSN in System DSN ( or "source des donnees de systeme" ) would resolve your issue.