I am new to VBA.I need to create a connection to database{oracle} and excute query.
I have opened the vba editor in excel 2010.
I tried typing some code in it
Sub Macro1()
Dim cnn As New ADODB.Connection
Dim rs As New ADODB.Recordset
I added the reference as mentioned, now I am getting another error -
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Best Regards
bond7
bond7
ASKER
Hello,
I found another VBA code which listed down the installed drivers and I found the Oracle in OraDb10g_home1.
I have changed the driver to Oracle in OraDb10g_home1.
Now the error is ORA-12560 .
I check the Microsoft ODBC for Oracle message -> this driver is not found.
Oracle in OraDb10g_home1 - message -> Specified driver could not be loaded due to system error 998.
i also tried creating new DSN, then it gives same error as above.
I am thinking it is due to drivers not found or drivers not accessible.
Please suggest
Arthur_Wood
do you have the Oracle clinet software installed on your PC? It is a free download from Oracle.
Could you please elaborate on the steps for "It fails at Dim cnn As New ADODB.Connection , saying user defiend type not found."
Best Regards
bond7