DB query to update database records

Configure a query to update the database records.

  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 DBQuery 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 for which to update the records.
    All columns within the selected table appear under Available columns.
  4. On the Record list, select Update. (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. For Return rows affected to, select a form control, variable (form/global) or field.
  8. To update multiple records in a database table, select Perform multiple updates. (Default: Clear)
  9. Configure your query based on specific conditions.

    For example, to update the ContactName, Address, and Phone records for the cities of London and Berlin, specify the condition as follows:

    1. Click .
    2. On the Column list, select a column, such as City(String).
    3. Set the Operator as equals (default).
    4. For Criteria, select a form control, variable (form/global) or field.

      Select Null to keep the criteria empty.

    5. Set the Logic as AND.
    6. Click Add.
  10. Click OK.

    The DB query action dialog box displays the Query.

  11. Click Save.