adspace


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 the use of defining a newobject in the object repository "Define New TestOject". How to use this further. If we define new testobject, how can it recognizes the objects properties of any application.

2229


how to use the regular expression for the below code-- swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:56" There is a tree view window of the folder's ie Medication- >Pharmacy(sub folder)with 56 as count of records...The records can be different or if no records present in the specific folder..then it show "Paharmacy:-no records".Whe i record at the first time .....and try to rerun the same script with different records count say "pharmacy:800"..qtp is not regnizing it...therefore i want to user regular expression..but donot now how to use it and where to use...i have tried.... swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:\*"..but it s of no use..plz help..me

3018


Hi this is chandra if any one have Navigation of LAB QTP, I want Navigation of those tools, if any one have the and know the Navigation each and every part of the QTP, plz send me my mail naruboinac@yahoo. com,naruboinas@ gmail.com

2010


Hybrid framework supports Descriptive programming. Is it true?

1245


hi i have 4 yrs exp in manual and automation testing using QTP i need sample resumes plz can u send this mail id pbre1980@gmail.com

1948


hi can anybody help with an qtp 9.2 license key please. Thanks, Nitesh.

2440


what type of framework u r using in ur organization

2155


we use a file extension .properties why is it used and where do we use it plz help me out with detailed explanation and navigation of how to use on the QTP 8.2?

2156


what is actually contain test report? can anybody post the test report

2105


Pls can anybody send me the Recent Technical and Interview Questions Which were asked in IBM(QTP)Automation PLZZZZZZZZZ

2123


can any body tell me how i create a simple script and apply output value on it .pls send me a step by step process

1878


Hi can anybody send me the QTP material, To my email ID: nuve1284@gmail.com ?

2195


Tell some commonly used Excel VBA functions?

1146


Hi,Sudhanandareddy plz forword framework and ppts for QTP to me. This is my mail id: ranjith_99reddy@yahoo.co.in (your contact number also)

2565


Hi All, How to get repeated word in string . Thanks Balaji

1430