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

what is vmodel?advantages and disadvantages of vmodel?

1616


How many types of recording facility are available in quicktest professional?

566


Can we use index on view?

1603


hi frinds i need help .i have 4 + yrs exp in testing and nearly 2 yrs exp in QTP and QC .currently iam working north fast 2 yrs iam looking for job in south is there any openings plz letme know my mail id is pbre1980@gmail.com

1572


How would you export a script from one pc to another in qtp?

663






How many tabs are available to view your test in a test pane and what are they?

563


What are the various automation frameworks available in qtp?

512


Explain in brief about the quicktest professional automation object model?

517


How to creating an output value using quicktest professional?

542


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

564


What is a reusable action?

576


how to find that a file has been completely downloaded or not? I told that "download Complete" pop up. but he told the tool doesn't recognize the pop up

3774


How often were they executed?

2039


What is the extension of the qtp local repository?

568


Are Shared ORs read-only?

632