06-24-2008, 03:22 PM
Hi,
I also have some problems, setting up a database connection to an oracle server.
I googlet a lot, but I just can't get it done...
My code is like this:
After the conn.open, the script stops having an error.
The errror I get with this code is:
"[Microsoft][ODBC Driver Manager][Oracle]ORA-12504: TNS: listener was not given the SID in CONNECT_DATA"
I'm a bit confused about the connection-string, because I did not find a way to specify the connection-port and the database used for this connection. I tried around with adding "SID=myDB" or "Data Source=myDB" and "Port=123". But it did not work...
With adding "SID=myDB", the error-message is:
"[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed".
I have installed OracleXEClient on my computer, but as I said, the db is running on a another server in the intranet. My PC on which also QTP is running, has Windows XP as OS.
Many solutions I found in the internet meant to specify the connection in the tnsnames.ora-file. But, honestly, I can't find such a file.
Is there a way to get the oracle-connection running without specifying some tnsnames.ora-file? Do I have to install some other version of oracle?
I also have some problems, setting up a database connection to an oracle server.
I googlet a lot, but I just can't get it done...
My code is like this:
Code:
set conn=Createobject("ADODB.Connection")
Srvname="Driver={Microsoft ODBC for Oracle}:Server=xyz.intranet.com,UID=abcd,Password=xyzz"
conn.open Srvname
...
The errror I get with this code is:
"[Microsoft][ODBC Driver Manager][Oracle]ORA-12504: TNS: listener was not given the SID in CONNECT_DATA"
I'm a bit confused about the connection-string, because I did not find a way to specify the connection-port and the database used for this connection. I tried around with adding "SID=myDB" or "Data Source=myDB" and "Port=123". But it did not work...
With adding "SID=myDB", the error-message is:
"[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed".
I have installed OracleXEClient on my computer, but as I said, the db is running on a another server in the intranet. My PC on which also QTP is running, has Windows XP as OS.
Many solutions I found in the internet meant to specify the connection in the tnsnames.ora-file. But, honestly, I can't find such a file.
Is there a way to get the oracle-connection running without specifying some tnsnames.ora-file? Do I have to install some other version of oracle?