How to connect to oracle(sqlserver) database to QTP

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you send user defined messages to test report?

814


write the vb script for call to new action in qtp?

2037


please post the interview questions for QA position in FACTSET

4200


Which functionalities of QTP used in banking project? pls any say answer?

1657


how to post xml data from QTP scripts to any application?

1755


What is accessibility check point?

871


can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?

1822


explain keyword driven framework with banking domain?

1774


Could any one tell me "How can i recognize my cursor position using QTP 9.2" Give me a scripts for this

2273


How do you create regression test packs?

868


why you have standardized functions? plzzz guys with real time exp. do answer

1647


How will you test a stapler?

837


What is optional step in qtp? How you can add optional step in qtp?

766


How to export quicktest professional results to an .xls file?

843


When I click on a link in web page.Link should open in new window.can anyone please let me know the script for this ---Koti

2695