?
Solved

QTP, issue connecting to Oracle DB

Posted on 2009-07-01
2
Medium Priority
?
2,002 Views
Last Modified: 2013-12-19
I am running below mentioned function in QTP ,
I get error "Provider cannot be found. It may not be properly installed.".Though I have installed oracle client on my machine(Oracle Runtime(213MB)).
Can please some one suggest whats missing.


Function:
Function Get_Id
      
            
      Dim objConn
      Dim objRecordset
      Dim strSQL

      Set objConn = CreateObject("ADODB.Connection")
      Set objRecordset = CreateObject("ADODB.Recordset")


  objConnectOracleReuse.ConnectionString = "Provider=OraOLEDB.Oracle; Data Source=(DESCRIPTION=(CID=GTU_APP)"  & _
               "(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myHostName)(PORT=port)))" & _
               "(CONNECT_DATA=(SID=sid)(SERVER=DEDICATED))); User Id=userId; Password=pwswrd;"

  strSQL = "SELECT MAX(COLUMN_NAME) AS VALUE FROM TABLE_NAME"
      

      objConn.Open
      objRecordset.Open strSQL,objConn
      
      Dim obj
      obj =  objRecordset.fields.item("VALUE")

      Msgbox obj
      objRecordset.Close
      objConn.Close

      Set objConn = Nothing
      Set objRecordset = Nothing

End Function
0
Comment
Question by:Kumaran_1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 48

Accepted Solution

by:
schwertner earned 1000 total points
ID: 24756677
myHostName
should be the name of the computer where Oracle Instance reside

port
should be 1521

sid
should be the name of the Oracle instance

Where are these values assigned?
0
 

Author Closing Comment

by:Kumaran_1
ID: 31598864
I already have this information, hostName, sid, port.Didn't add to this post.Some issue exist in oracle client installation.nOT SURE WHAT IT IS.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question