I have encountered a need to connect to an Oracle db, and am not having much luck. I have read through a number of posts on the forum, with several different ways of doing it, but seem to be getting an error either way. I have a DSN set up, and can manually (successfully) test the connection, but something I am doing in the script does not seem to work. I would appreciate any suggestions, as this is not my forte.
Info:
Machine has Oracle 11g installed (Oracle in OraClient11g_home1)
A couple methods I have tried:
For this one, I have tried the full driver string, as well as just OraClient11g_home1. The error returned from my error handler is "Data source name not found and no default driver specified"
$DSN = "Driver={Oracle in OraClient11g_home1}; " & _ "CONNECTSTRING=(DESCRIPTION=" & _ "(ADDRESS=(PROTOCOL=TCP)" & _ "(HOST=10.10.204.87)(PORT=1521))" & _ "(CONNECT_DATA=(SERVICE_NAME=123prod)));uid=admin;pwd=Admin123;" $conn.Open($DSN)
For this one, I tried both the Oracle 11g above, and Microsoft ODBC for Oracle. I get a different error for Microsoft ODBC for Oracle: "Driver's SQLSetConnectAttr failed"