How to connect oracle database to WinRunner using DB stataments?

Questions by subbualla

Showing Answers 1 - 3 of 3 Answers

adisgee

  • Aug 2nd, 2007
 

Hi,

Connection to the Database can be established using an ODBC connection.
Following are some simple steps that may help:

1. Set up an ODBC DSN
a. Go to the control panel and then double clikc on the "Data Sources (ODBC)" icon within the Adminstrative Tools folder
b. This opens the ODBC administrator
c. Set up a User DSN connection by selecting the ODBC driver for Oracle, slecting the database the driver should connect to and then specifying a name for the DSN

2. Use the DSN in your WinRunnner script / code
(I dont recall the syntax but the help file for WinRunner functions will give you a complete list of db_coonect and other related functions)
a. Define the DSN in the code (use a variable/constant to store the DSN name)
b. Connect using the db_connect function <DSN name> to the database
c. Verify that the connection is successful
d. Ur ready to manipulate records.

3. Be sure to release the connection after ur done. This will save some memory for you, cos if there are a lot of connections open then it will slow down the application testing / WinRunner code execution.

Hope this helps,

Thanks,
Aditya.

  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