Data Operation Step

Use a Data Operation step to perform operations on an SQL statement you open with an Open SQL Statement step. Use the Data Operation step to fetch new records, retrieve values from a record, modify existing records, create new records, and delete records. For SQL statements that require parameters, you can create parameters and specify input values, execute statements, close statements, and fetch output parameter values.

You cannot encapsulate data operations within a transaction because the current Database step types do not support transactions.

Configuring the Step

Use the Edit Data Operation dialog box in the TestStand Sequence Editor or in a TestStand User Interface to configure the Data Operation step.

Step Properties

In addition to the common custom properties , the Data Operation step type defines the following step properties:

  • Step.StatementHandle —A string expression that contains the name of the SQL statement on which to operate.
  • Step.RecordToOperateOn —The record on which to operate. Valid values are 0 = New, 1 = Current, 2 = Next, 3 = Previous, and 4 = Index.
  • Step.RecordIndex —The index of the record on which to operate when you set the Step.RecordToOperateOn property to fetch a specific index.
  • Step.Operation —The operation to perform on the record. Valid values are 0 = Fetch only, 1 = Set, 2 = Get, 3 = Put, 4 = Delete, 5 = Set and Put, 6 = Execute, and 7 = Close.
  • Step.ColumnListSource —The name of the DatabaseColumnValue array variable or property that stores the column-to-variable or column-to-property mappings. By default, the value is Step.ColumnList .
  • Step.ColumnList —The column-to-variable or column-to-property mapping to perform on a Get or Set operation. The property must be an array of DatabaseColumnValue custom data types, which contain the following subproperties:
    • ColumnName —The name or number of the column from which to obtain a value or to assign a value to.
    • Data —Specifies the variable or property to which TestStand assigns the column value or the expression TestStand evaluates and assigns to the column.
    • FormatString —An optional format string for dates, times, and currencies. Use the empty string ("") to use the default format.
    • WriteNull —Specifies whether TestStand writes NULL to the column instead of the value in the Data expression property.
    • Status —The error code TestStand returns for the Get or Set operation.
    • Direction —An enumerated value that specifies the parameter direction as In , Out , In/Out , or Return .
    • Type —An enumerated value that specifies the parameter value as String , Number , Boolean , or Date/Time .
    • Size —The maximum size of a string parameter.
  • Step.SQLStatement —The SQL statement the Edit Data Operation dialog box uses to populate the ring controls that contain column names.

See Also

Database Step Types