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

  1. 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).
  2. 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 the SELECT FROM statement.
    • xml – Retrieved rows will be formatted as XML. Applies to SELECT FROM statements only. The root node of the XML document is Output , which contains the Results element that contains one or more Resultelements for multiple results. Each result contains Summary and Data 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 is Output , which contain the Results element that contains one or more Resultelements for multiple results. Each result contains one Data element.
    • json – Retrieved rows will be formatted as JSON. Applies to SELECT FROM statements only. The top level tag is output . The tag at the next level is results which contains one or more results represented by a JSON array. Each result is represented by the summary and data tags.
    • json-with-summary – Retrieved rows will be formatted as JSON with summary. Applies to SELECT FROM statements only. The top level tag is output . The tag at the next level is results which contains one or more results represented by a JSON array. Each result is represented by one data tag. The summary element contains some information about the columns specified in the SELECT 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 to BINARY , VAR BINARY , LONGVARBINARY , CHAR , VARCHAR , NCHAR , NVARCHAR , LONGNVARCHAR and LONGVARCHAR 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.