DB query to add records to a table

  1. On the DB query action dialog box of a form, click Configure.

    For a Data access activity, click Configure in the properties panel of the activity.

    The <ActionName> dialog box is displayed.
  2. To specify the database connection string that holds the details of the relational database, on the Database connection list, select the global variable or click to manually enter the connection string.

    For a DAS activity, select the process or server variable or click to manually enter the connection string.

    By default, the Type list displays Tables and all tables within the selected database appear on the Tables list.

  3. On the Tables list, select the table to add records.
    All columns within the selected table appear under Available columns.
  4. On the Record list, select Add. (Default: Get)
  5. Select the columns and click to move the columns from Available columns to Selected columns.

    Use and on the column header to reorder the columns.

  6. To map the values to the selected columns, on the Value list of the column, select form control, form/global variable or field, or click and enter static value.
  7. On the Return rows affected to list, select a form control, form/global variable or field.
  8. To insert multiple records in a database 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. Select Perform multiple inserts.
    2. Select either option:
      • Insert all rows (Default): 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.
    4. Click OK.
  9. The DB query action dialog box displays the Query.
  10. Click Save.