Solved

QTP, issue connecting to Oracle DB

Posted on 2009-07-01
2
1,956 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
2 Comments
 
LVL 48

Accepted Solution

by:
schwertner earned 500 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Note: You must have administrative privileges in order to create/edit Roles. Salesforce.com (http://www.salesforce.com/) (SFDC) is a cloud-based customer relationship management (CRM) system. It is a database most commonly used by sales and markeā€¦
These days socially coordinated efforts have turned into a critical requirement for enterprises.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

679 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