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

How to use actions in qtp ?

0 Answers  


HI All i need one suggestion.is there any companies taking corresponding degree courses. i have 3+ yrs exp in QTP and i am working north side. iam looking for job in south.

1 Answers  


Up to how much VB scripting knowledge and what type of VB script knowledge is required for a QTP test engineer for real time to work ?

3 Answers  


What is debugging? How you debug your script?

0 Answers  


Explain the concept of object repository and how quicktest professional recognises objects?

0 Answers  






what is functions in qtp?i know the userdefind &bulit funation or i know that Private public function ?plz tell me what is funations in qtp?how to create a funation in qtp

4 Answers   NIIT,


How to data driven test for Win objects in QTP ?

0 Answers  


Hi.. I want to do parametrization for selecting perticular flighr say XYZ by using local table: criteria: 1.If flight is available msgbox "Flight is available" and then select flight from flight table and click to ok button after that as enter username and ticket no and then stop 2. otherwise msgbox " Flight is not available" and stop Please help me out ..and let me know your responses on dipak.bachhav@gmail.com Regard, Dipak

0 Answers  


Plz explain about object propeties in object identification? means.. explain about 1. mandatory properties.2. assestive properties 3. ordinal properties.

3 Answers   TCS,


Why do we use breakpoints in QTP?

0 Answers  


How will you test a stapler?

0 Answers  


I want to scroll down in MSPAINT (captured a screen already). So that I can read the data in it through the step Window(paint).GetVisibleText for my validation. Anyone know the scripting for this?

1 Answers   TCS,


Categories