Professional Documents
Culture Documents
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
Record Set : It is a temporarily location where we can store the retrieve data from data base at time.
From that temporarily location we can use the data one by one or as per requirement in our
testing.
Connection : Connects the application and database.
* 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
v1 v2 res
10 20 30
30 30 60
30 20 50
90 90 180
2 8 10
For MSACCESS :
=============================
* For Oracle and SQL we will write both Provider name and Connection in one line and rest is same.
For Oracle
con.open “provider=oraoledb.1;server=locahost;uid=userID;pwd=password;database=database name”
For SQL
con.open “provider=sqloledb.1;server=locahost;uid=userID;pwd=password;database=database name”
-: The End :-
Pls. leave your feed back (both +ve and –ve ) at kanakadria@yahoo.co.in