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

If there r 1000 test scripts that were written. If a change to any functionality is to be made then how can we know in which script is this functionality existing.

4 Answers   iGate,


Can we write class for vb script in Quick Test Professional?

2 Answers   JPMorgan Chase,


I have 14 itmes in a drop down that are associated with an account And these items change with different accounts I want to be able to define it by and index number or any other id so if I enter 2 in my Global excel sheet it selects the 2nd item from the drop down - is this possible?

5 Answers   Rogers,


how to click on object? (with out knowing the object details) for ex: in a webpage one link is available.i want to click that link by using one menthod through qtp?

3 Answers   Zensar,


What is the file extension of the code file & object repository file in QTP?

2 Answers  






How the QTP recognize, handle n reports that a error has been handled by it(QTP) when we perform a recovery scenario in our application n in what manner it will display it in resulting window? Plz help me out.

1 Answers  


Tell me about qtp?

0 Answers  


I have written some scripts in QTP by using older version, but I want to run them in latest version. Is there any process to do that.If so can anyone explain me?

1 Answers  


what is output parameters in qtp?explain? 2)

2 Answers   Span Infotech, TCS,


1 Folders in VSS 2 In navigation script there are 100 script i want to run first 50 and 37th script also not needed to run how to do this 3 What is navigation script,Driver script, business script what we are loaded in this script 4 use of resource tab 5 Difference between verification and validation give real scenario example 6 file scripting object when to use it 7 what are the problems you are faced while testing web application 8 difference between expert view and keyword view 9 difference between QTP 8.2 and QTP 9.2 navigation frame work please answer these questions from real time working people as early as possible

0 Answers  


I Selected for TCS-Chennai(Contract to hire) position plz suggest me whether i have to join or not

2 Answers   TCS,


What is the difference between low level recording and analog recording mode when it will be enabled.

5 Answers   Ordain Solutions,


Categories