How to connect to oracle(sqlserver) database to QTP

Answers were Sorted based on User's Feedback



How to connect to oracle(sqlserver) database to QTP..

Answer / madhumitha

we can connect to oracle database throught conntection
string....
code for connecting to db

set con=createobject("ADODB.Connection")
set rs=createobject("ADODB.Recordset");
con.ConnectionString="DRIVER={oracle in orahome92};SERVER=
(servername);UID=(username);PWD=(password);DBQ=dbserver"
con.open
query="select * from tablename"
rs.open query,con
while not rs.EOF
i=0;
msgbox(rs(i))
i++
rs.move next
wend
rs.close
con.close
set rs=nothing
set con=nothing

any coments always welcome

Is This Answer Correct ?    7 Yes 0 No

How to connect to oracle(sqlserver) database to QTP..

Answer / raghavan

by odbc connection using DSN

Is This Answer Correct ?    2 Yes 0 No

How to connect to oracle(sqlserver) database to QTP..

Answer / adarsh (saama technologies)

set con=createobject("ADODB.Connection")
set rs=createobject("ADODB.Resultset");
con.open"provider=oraoledb.1;server=
(servername);UID=(username);PWD=(password);DB=dbserver"
rs.open query,con
Do while not rs.EOF
i=0;
msgbox(rs(i))
i++
rs.move next
loop
rs.close
con.close
set rs=nothing
set con=nothing

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More QTP Interview Questions

What is difference between Class and MicClass

2 Answers  


unable to get item from the combobox using descriptive programing. can any one give me the peice of code to schedule the booking from one place to another using DESCRIPTIVE PROGRAMING.

1 Answers  


w is datatable

5 Answers   CTS, IBM,


Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.

0 Answers   ABC, scintel,


What is the latest version in QTP?

55 Answers   Bharti, Polaris, US Technology,


What is test harness?

2 Answers  


what is the diffrence bw qtp architectute and qtp framework?

0 Answers  


Plz give the vb script for the following scenerio I have faced one issues while doing test in QTP. I have described the scenario below. 1. I have to test web application.In that i want to select from the drop down values in the application. 2. Suppose Drop down has 5 value "A,B,C,D,E".I would like to give value from data table of QTP. 3. For every iliteration it should select A,then B and so on

0 Answers  


In a web page, one web table is present which is dynamic. In that table one of the column has links with the same inner text. write a script so that i need to click the third link.

3 Answers  


IF THE GUI OF APPLICATION IS CHANGED THEN IS THERE ANY NECISSITY TO CHANGE OR UPDATE OUR TEST SCRIPTS

2 Answers  


how can we do the frame work in qtp

0 Answers   L&T,


What is the difference between gettoproperty and settoproperty?Explain with an example?

4 Answers   QQS, Satyam,


Categories