Add records to a database table

Create a database query to add records to a database table.

  1. On the properties panel of the Data access activity, click Configure.
    The Data access configuration dialog box is displayed.
  2. On the Database connection list, select the process or server variable to specify the database connection string that holds the details of the relational database.

    By default, Tables is selected and all tables within the selected database are available on the Tables list.

  3. On the Tables list, select the table to add records for. All columns within the selected table appear under Available columns.
  4. On the Record list, select Add.
  5. On the Available columns list, select the columns to add records to and click  .
  6. Provide static or dynamic values for the selected columns.
  7. To insert multiple records in a table at runtime:
    Note In the Properties panel of the Table control > General tab, ensure the Multi-select and Add and modify properties are selected.
    1. On the Database query page, select the Perform multiple inserts option.
    2. Select either option:
      • Insert all rows: Inserts all rows for the selected columns.

      • Insert selected rows: Inserts selected rows for the selected columns.

      Note Multiple selection of rows is available only if you create a DB query action on forms.
    3. For information on selection criteria and the DB query outcome, see Insert multiple records into a database.
  8. On the Return rows affected to list, select the variable.
  9. Click OK.