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

Explain how you can find length of array in qtp?

0 Answers  


What is the need and applications of learning VB script for a automation(QTP) engineer ain Realtime ?

2 Answers  


How to get all the objects count and objects names in webpage using QTP ?

6 Answers  


what is error and fault in terms of software quality?

0 Answers   TCS,


What are the types of Object Repository’s in QTP?

1 Answers   Crea,






Why do we go for Qtp? What are the advantages of qtp? Diff between winrunner and Qtp?

3 Answers   Symphony,


Hi we are using QTP9.0 for Seibel Application and this seibel application will give you a popup messagebox which is of web , so qtp takes 3 mins to recognize the messagebox and to click on it , we have more number of messageboxes like this . please suggest me some solution

0 Answers   CFC,


Explain about the test fusion report of quicktest professional (qtp)?

0 Answers  


How to return a value from a fn, if it has more than one value how to return

3 Answers   Verizon,


what frame work you are following?

0 Answers   Wipro,


How do you test DLL files using automation Tool QTP?

0 Answers   Qwest,


How to capture checkbox properties when properties of the object keep changing on relogin to the application.

0 Answers   TCS,


Categories