Defining a Database Action
Once you've added one or more database actions to a test clip, use the following steps to define a given action.
How to
-
Double click the action to open its
properties in the lower panel. When you do so, the General tab appears.For each action
that you add, you will specify one and only one SQL statement (or SQL command).
- Define the following Database action parameters in the General tab:
- Output — Select the output option (from the drop-down list) for the Result of SQL statement execution (from among the following output options):
- execute-only – The Query will be executed but no rows will be retrieved from the database.
- summary – The Query will be executed but no rows will be retrieved from the database. Two examples:
The SQL statement was executed successfully. (0)
The SQL statement was executed successfully. (1 row affected)
- read-and-discard – The Query will be executed and all rows will be retrieved from the database but then discarded. Applies to
SELECT FROM
statements only. - csv – Retrieved rows will be formatted as CSV. Applies to
SELECT FROM
statements only. - csv-with-header – Retrieved rows will be formatted as CSV with header line. Applies to
SELECT FROM
statements only. The header line contains the column names specified in theSELECT FROM
statement. - xml – Retrieved rows will be formatted as XML. Applies to
SELECT FROM
statements only. The root node of the XML document isOutput
, which contains theResults
element that contains one or more Resultelements for multiple results. Each result containsSummary
andData
elements. - xml-with-summary – Retrieved rows will be formatted as XML with summary element. Applies to
SELECT FROM
statements only. The root node of the XML document isOutput
, which contain theResults
element that contains one or more Resultelements for multiple results. Each result contains oneData
element. - json – Retrieved rows will be formatted as JSON. Applies to
SELECT FROM
statements only. The top level tag isoutput
. The tag at the next level isresults
which contains one or more results represented by a JSON array. Each result is represented by the summary anddata
tags. - json-with-summary – Retrieved rows will be formatted as JSON with summary. Applies to
SELECT FROM
statements only. The top level tag isoutput
. The tag at the next level isresults
which contains one or more results represented by a JSON array. Each result is represented by onedata
tag. The summary element contains some information about the columns specified in theSELECT FROM
statement, including column name, column (data) type, and approximate column size. - Max Row Count — The maximum number of rows that a query (or SQL SELECT statement) can return to the given number. If the limit is exceeded, the excess rows are silently dropped. Zero (which is the default) means there is no limit.
- Max Bytes to Retrieve Per Column — The maximum number of bytes per column that can be returned for character and
BINARY
column values by a query (or SQL SELECT statement). This limit applies only toBINARY
, VARBINARY
,LONGVARBINARY
,CHAR
,VARCHAR
,NCHAR
,NVARCHAR
,LONGNVARCHAR
andLONGVARCHAR
fields. If the limit is exceeded, the excess data is silently discarded. Zero (which is the default) means there is no limit. - Execution Timeout (optional) — SQL statement execution timeout, in seconds, minimum 1, and maximum 65535. If specified, the value overrides the Execution Timeout set at the Target level.
- Errors Should (optional) — As with other types of messages and actions, the default failure action is to fail the parent. Select another option, if necessary.
- Output — Select the output option (from the drop-down list) for the Result of SQL statement execution (from among the following output options):