Tuesday, 21 August 2012

L18 - Datatbase Output Value

It inserts values in the datatable in the run time from the database as per the sql query defined and we can use the same value in run time.

Step 1

Goto Menu -> Insert -> Output value -> Database output value. 

Step 2

Database Query wizard will open.
Select "Create query using Microsoft query".
Press Next

Step 3

select MS Access database as per are taking example with MS access database.

Step 4

Select the database that is being used.

Step 5

Select all the fields of table that we want to use.

Step 6

Put conditions for query.

Step 7

Select option "Exit and return to Quick test professional'

Step 8

database output value properties window opens.
It shows all the output values of the fields/query selected.
We can configure the output values in lower portion of the widow using Modify button.
 If we press Ok -> we can see the columns created as per the parameter data in data table as shown below.

Step 9


DbTable("DbTable").Output CheckPoint("DbTable")
x=Datatable.Value("DbTable_Row_1_Col_1_out", dtlocalsheet)
Msgbox x

Value comes in variable x during run time and we can use it as per our requirement.

Step 10