How to connect to the Database from QTP?

Answer Posted / ramireddy

Thru Self scripting:
set conn=createobject("adodb.connection")
set rs=createobject("adodb.recordset")
' Oracle client is required to be installed on your box
conn.open= "Provider=OraOLEDB.Oracle.1;Password=***;Persist
Security Info=True;User ID=****;SERVER=****;Data
Source=****;DBQ=****;"
sql="your sql"
rs.open sql,conn

rs.close
set rs=nothing

conn.close
set conn=nothing

Is This Answer Correct ?    25 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to write the descriptive programming in QTP for remove the object value and substitute, with a variable then call the validation from excel

1897


How can I find out the cursor position through QTP suppose I am keep tabbing(Pressing the tab key continuously) and stoped at a position Now I want to find out where the cursor position is

6296


what is the diffrence bw qtp architectute and qtp framework?

1533


How you can find length of array in qtp?

536


Hi, i run scripts in one machine those r passed.when i run the scripts in client side those r failed.Give me such a scenario when ever u faced?

1505






How many types of recording modes in qtp? Describe each type with an example where we use them?

605


How does QTP identify an object?

605


I am getting an error "failed to open the XML checkpoint result viewer" in result window,after clicking on "View XML checkpoint results".Someone suggest me settings,if any...

1453


Explain how Selenium is different from UFT?

685


Explain data driven framework?

571


What are the Application Functions available in QTP?

1467


How does qtp recognize objects in aut?

574


Whats the realtime QTP testing process

1984


How can you close the second opened browser?

794


How to start recording using quicktest professional (qtp)?

587