DB query action

Add a DB query action for a form or form controls such as drop-down lists or text boxes to add or manage database records.

Use the DB query action to point to the required database and design access for operations such as View, Add, Update and Delete. For example, you can interact with the Customer table in a database to display the customer name in the Name box on a Customer Details form.

You can use the DB query action to add multiple records at a time, search for records with similar values, and use stored procedures.

  • You can use DAS to connect to any database for which an OLE DB driver is available. However, the Data Access Service in TotalAgility only supports SQL Server and Oracle databases.
    Note Data access activity does not support 'Always Encrypted' columns in SQL Server 2016 and above.
  • Before you can create a DB query action, you must set up a database connection string. See Set up a database connection string.

Additional Information

The following sample data values can be provided:

  • All numeric types = -1

  • Dates = 01/01/1900

  • Byte = 0

  • String = Blank String

  • Boolean = False

  1. On the form modeling bar, click Actions and click New.

    The New action dialog box is displayed.

  2. On the Type list, select DB query.
  3. Change the default Name (DBQuery1) to something meaningful.
  4. Optional. Select Multilingual to configure a unique action for each language separately. See Configure multilingual actions.
  5. To create a DB query, click Configure.

    The query (<query name>) dialog box is displayed.

  6. Configure the query. See Create a DB query.

    Once a query is created, it appears in the Query box.

  7. Click Save.

    The newly created action is added to the table.

  8. Associate the action with the control to trigger this action. See Configure actions for form control events. Alternatively to call this action for a form event, associate the action with the form. See Associate an action with a form.

    When this action is triggered, the relevant action is performed based on the DB query.