Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
connect oracle to QTP
#4
Solved: 11 Years, 3 Months ago
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:

Code:
set conn=Createobject("ADODB.Connection")
Srvname="Driver={Microsoft ODBC for Oracle}:Server=xyz.intranet.com,UID=abcd,Password=xyzz"
conn.open Srvname
...
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?
Reply


Messages In This Thread
connect oracle to QTP - by sherinvg - 02-26-2008, 12:51 PM
RE: connect oracle to QTP - by priyankmg - 03-14-2008, 04:07 AM
RE: connect oracle to QTP - by sherinvg - 03-14-2008, 01:50 PM
RE: connect oracle to QTP - by idolast - 06-24-2008, 03:22 PM
RE: connect oracle to QTP - by somisays - 06-24-2008, 05:49 PM
RE: connect oracle to QTP - by idolast - 06-25-2008, 02:42 PM
RE: connect oracle to QTP - by somisays - 06-26-2008, 12:22 AM
RE: connect oracle to QTP - by idolast - 06-26-2008, 03:28 PM
RE: connect oracle to QTP - by idolast - 06-27-2008, 12:18 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting error while connecting from qtp to oracle sql developer. Ritanjali Pradhan 1 3,170 09-26-2014, 02:06 PM
Last Post: vinod123
  Not able to connect to Oracle SQL Developer Paras Singh 0 6,753 05-30-2013, 01:25 PM
Last Post: Paras Singh
  Choosing Add-ins in QTP When Oracle forms or other IDEs used in web based application QTPBeginer 0 2,599 03-27-2013, 11:06 PM
Last Post: QTPBeginer
  Connect to QC ravi.gajul 3 14,689 09-18-2012, 12:39 PM
Last Post: SrinuKodi
  QTP API to connect to Performance Center(ALM) as_srini 3 5,690 06-14-2012, 09:14 PM
Last Post: Ankesh

Forum Jump:


Users browsing this thread: 3 Guest(s)