Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Connecting to oracle DB with QTP
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi All,

In my application i want to connect oracle database to QTP .I tried with below code but failed to establish connection. For this, I have created data source name by following steps :
Control Panel...>Administrative Tools...>Data Sources (ODBC) ...>select system DSN...>
Click on Add...>Select Driver “Microsoft ODBC For Oracle” Database
And C:\oracle_10.2.0_client_1 software has been installed in my machine. I have tried many ways even I am getting following errors with respective to the following codes:
Case1:
Code:
set strcon=createobject("ADODB.Connection")
                set Recordset=createobject("ADODB.Recordset")
                strcon.Open "Provider=OraOLEDB.Oracle"
                strcon.Open "DRIVER={Microsoft ODBC for Oracle};UID=username;PWD=password;SERVER=servername;DBQ=DBQname;"
Error message: Provider cannot be found. It may not be properly installed.
                Line (5): "strcon.Open "Provider=OraOLEDB.Oracle"".
Case2:
Code:
set strcon=createobject("ADODB.Connection")
                set Recordset=createobject("ADODB.Recordset")
                strcon.Open "Provider=msdaora;DRIVER=Microsoft ODBC for Oracle;User Id=username;Password=password;SERVER=servername;"

Error Message: ORA-12560: TNS:protocol adapter error
Case3:
Code:
set strcon=createobject("ADODB.Connection")
                set Recordset=createobject("ADODB.Recordset")
strcon.Open "Provider=msdaora;Data Source=MyOracleDB;User Id=username;Password=password;SERVER=servername;"
Error message: ORA-12154: TNS:could not resolve the connect identifier specified

please help me to resolve this problem

Thanks and Regards
Raju
Reply


Messages In This Thread
Connecting to oracle DB with QTP - by rajendra649 - 12-07-2011, 02:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP 11 - Oracle Forms objects not recognised WarrenRay 0 3,186 06-23-2015, 09:35 PM
Last Post: WarrenRay
  QTP recognizing Oracle forms as Java objects shankar.srini88 0 4,671 03-25-2014, 10:26 AM
Last Post: shankar.srini88
  Connecting to database Irishman 0 4,440 07-24-2012, 11:30 PM
Last Post: Irishman
  Unable to record Oracle Forms apps and Oracle java based apps dejanbo 0 3,514 06-19-2012, 08:05 PM
Last Post: dejanbo
Exclamation QTP 11 - Object properties are lost after execution of script for Oracle Forms 11 ramapullareddy 0 2,953 12-07-2011, 04:15 PM
Last Post: ramapullareddy

Forum Jump:


Users browsing this thread: 1 Guest(s)