Professional Documents
Culture Documents
Data Base Connections: 1. How To Connect
Data Base Connections: 1. How To Connect
Data Base Connections: 1. How To Connect
com
Data Base Connections
Test data may be in Database, so that we should connect our test to database and
retrieve the data and use the same in test.
1. How to Connect 2. How to Establish connection 3. How to Retrieve and use the data
1. Driver / Provider : A third party software used for establishing the connection between front end
* We need to create Object Instances for both Record Set and Connection.
Example : For example, test data is stored as below, do write the database
connection script. Testdata.mdb
re
v1 v2 s
10 20 30
30 30 60
30 20 50
90 90 180
2 8 10
For QTP Realtime Scripts, visit www.ramupalanki.com
MSACCESS
For :
the Connection ‘ Assigning the connection with 3rd party provider i.e with microsoft
con.provider = “Microsoft.jet.oledb.4.0” *
‘ Opening the database by specifying the
location
con.open “d:/automation/testdat.mdb”
‘Retrieving the data from data table
Loop
=============================
* For Oracle and SQL we will write both Provider name and Connection in one line and rest is same.
For Oracle
For SQL
-: The End :-
Pls. leave your feed back (both +ve and –ve ) at kanakadria@yahoo.co.in