I am currently writing a excel macro that connects Oracle server and encountering the following failure.
'run-time error '-2147418113 (8000ffff)' - Catastrophic Failure'
The code that I wrote is as following:
StrConn = "Provider=ORAOLEDB.Oracle;Data Source=xxxxxxxx:xxxx/xxxx;
User Id=xxxxxxx;Password=xxxxxxxxx;"
Set Conn = CreateObject("ADODB.Connection")
Set Rs = CreateObject("ADODB.Recordset")
Conn.CommandTimeout = 1000
Conn.cursorlocation = 3
Conn.Provider = "OraOLEDB.Oracle"
Conn.Open StrConn
The error occurs on Conn.Open StrConn
And yes I have installed Oracle OLE DB drivers on my computer.
I have read a lot of solutions on similar problems but non worked for me. I have tried adding prompt property, changing cursorlocation, reinstalling the drivers, changing vba reference, but it all results in the catastrophic failure I am experiencing.
There is another weird part to the problem. As my senior tried to help me to solve the problem, I sent the excel file to him to another computer (Lenovo), installing the oracle drivers the same as I did on my computer (HP). Yet, the code is working fine on the Lenovo computer. Thus, I did a little experiment and tried installing oracle drivers and opening the excel file on another HP computer (same model as my computer) and the same error occurred.
I have spent days trying to find solutions on the internet. Can somebody help me...