How to establish the database connection using QTP?

How can you create a test data in oracle and how to fetch the data from it? Explain it with an example.

Showing Answers 1 - 1 of 1 Answers

anil

  • Aug 21st, 2007
 

we can connect to oracle database through connection string....code for connecting to dbset con=createobject("ADODB.Connection")set rs=createobject("ADODB.Recordset");con.ConnectionString="DRIVER={oracle in orahome92};SERVER=(servername);UID=(username);PWD=(password);DBQ=dbserver"con.openquery="select * from tablename"rs.open query,conwhile not rs.EOFi=0;msgbox(rs(i))i++rs.move nextwendrs.closecon.closeset rs=nothingset con=nothing

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions