Store In Database

Use this step to store data from a variable in a database. This step works similarly to the Store In Database step in the Basic Engine Robot. To change records in your database, use the Execute SQL step. To extract data from the selected database, use the Query Database step.

The step verifies that the table it is writing to matches the definition of the type and configuration, and produces an error if any of these do not match. A warning is also displayed while editing the Robot, as long as the database can be reached. In this case, you can right-click the step and select (Re)create Table in Database to open an SQL dialog box, which helps you update the table from Design Studio.

When in debug mode and Values are Returned or Stored is selected under Stop When, the robot that uses the Store In Database step stops only when the execution returns to the calling Basic Engine robot, which means that the called Robot might store multiple values in a database before it stops in the debugger.

You can add this step directly from the Robot workflow or from the State pane by right-clicking a type and clicking Insert Step > Store In Database.

Properties

Database Mapping

Select a database mapping from the databases specified in the Call Robot step.

Variable

Select a variable to read the value from. This variable must be of a complex type.

Key

Select how to compute the key for the value in the database. If you select Key Defined in the Type, the attributes that are marked as Part of Database Key in the Type editor are used to compute the key. Otherwise, when you select Calculated Key, specify an expression to compute the key.

Audit Data

If selected, the Audit data fields are included with the value. For more information, see Store Data in Databases. This step is compatible with the Store In Database step in Basic Engine Robots only as long as Audit Data is selected.

Manage stored database values

Manage the stored database values using the Robot Editor tab in Design Studio Settings or the State pane menu items.

To open the Robot Editor tab:

  • In Design Studio, on the Settings menu bar, select Design Studio Settings > Robot Editor.

  • If stored database values have already been collected in the State pane, right-click Databases and select Limit Stored Values.

You can perform the following actions on the stored database values.

  • Select whether you want to collect the stored database values in the State pane.

    Clear the Collect Stored Database Values in State check box to hide stored database values from the State pane.

    Clearing the check box after executing the steps that already have stored database values does not affect the existing listing in the State pane. Remove the required stored database values manually.

  • After the Store In Database step is executed, all values are collected, but only the latest are displayed in the State pane.

    Go to the Robot Editor tab and specify the Max Number of Database Values Shown.

  • To remove all the stored database values listed in the State pane, right-click Databases and select Clear Stored Values.

  • To remove a single value listed in the State pane, right-click the required stored database value and select Clear.

See also State and Robot Editor.