Execute Query

This activity is used to when we need a specific detail from the table. This activity
can be performed along withth e table viewer activity to view the details of the
table in an output box.

Technical Reference

 

 

INPUT

DBName: Specify the name of the database in which the table is present.

Location: Specify the location where the database is saved.

Query: Specify the query as to what details are required from the table.

 

 

 

 

 

MISC

Display Name: Displays the name of the activity. You can also customize the activity name to help troubleshoot issues faster. This name will be used for logging purposes.

SkipOnError: It specifies whether to continue executing the workflow even if it throws an error. This supports only Boolean value “True or False.”

True: Continues to execute the workflow irrespective of any error thrown.

False: Stops the workflow if it throws any error

Version: It specifies the version of the Portable database feature in use.

OUTPUT

Datatable: Declare a variable here to see the output in a table.

*Mandatory Fields to execute the workflow

Use Case

The following example illustrates on how we can use the execute query activity, to
view the whole or a specific detail from a table.

Steps to execute a bot

1.      Drag and drop an execute query activity to the workflow.

2.      Double click on the activity and fill the required details

3.      Here we are going to mention the query as “ Select * from Table name;”, Here it is
“ Select Contact from CompanyContact;”

4.      Declare a variable in the datatable box of the output segment in the property box.
 Here it is Dt.

5.      Drag and drop a table viewer activity below the execute query activity.

6.      Enter the same variable declared above in the InputTable box of the input segment
 to pass on the datatable values from the execute query activity and view them.

7.      Execute the activity in the debug mode, since we have a table viewer activity in the
workflow.

The bot executes the workflow and displays the table with only the Contact details
from the table.