how we connect oracle or sql data server database to qtp.

Answer Posted / mohit

You may try:

Dim rs,sq,pkey
set conn=createobject("adodb.connection")
set rs=createobject("adodb.recordset")
' Oracle client is required to be installed on your box
conn.open= "Provider=OraOLEDB.Oracle.1;Password=***;Persist
Security Info=True;User ID=****;SERVER=****;Data
Source=****;DBQ=****;"
sql="your sql"
rs.open sql,conn

rs.close
set rs=nothing

conn.close
set conn=nothing

Is This Answer Correct ?    7 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to Open FireFox using descriptive programing? If my question is not clear, i will give an Example To Open Internet Explorer, We use Set IE = CreateObject(InternetExplorer.Application) IE.Navigate "www.yahoo.com In the same i need to open yahoo.com in firefox. Can any one tell me what is the server name of firefox to create an object

2801


How to use the object spy in quicktest professional 8.0 version?

789


While spliting an action in QTP 10.0 getting an error : "This Line is a part of Script Block.You cannot split the action on this line." how to re-solve this and split the script into actions?

1706


What are the trigger events in qtp?

846


How many add-ins comes by default with qtp?

834


What is qtpro? What is quick test pro?

845


how can i call function (which has link with excell sheet at a remote location) within another function

1808


how to disable the pop ups through QTP using a script

1988


Mention what are the different types of recording modes in qtp? Which will be used when?

807


how to know no.of mails in our g mail by using vb-script

2009


I want to grow as a Automation Engineer,Kindly help me in clearing my interview that what interviewer looks for as a Automation Engineer. I am having three years of experience in testing.

1850


How to suppress warnings from the test results page?

822


Hi could some one explan what is the use of the function Defination generator, And how to use the function defination generator.. Explan with the example..

1589


How to do the scripting. Are there any inbuilt functions in QTP? What is the difference between them? How to handle script issues?

844


Can anybody post some real time scenario in qtp? please its very urgent.

2062