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.
- The Data Access Service in TotalAgility only supports SQL Server and Oracle databases. However, it does not support the 'Always Encrypted' columns in SQL Server 2016 and above.
-
When configuring a DB query action, you can now select which database schema to use for retrieving database objects. This provides greater flexibility when working with databases that contain multiple schemas.
-
On the form modeling bar, select
Actions and then select
New.
The New action dialog box is displayed.
- On the Type list, select DB query.
- Change the default Name (DBQuery1) to something meaningful.
- Optional. Select Multilingual to configure a unique action for each language separately. See Configure multilingual actions.
-
Create the DB query. You can create a DB query for the following:
Once a query is created, it appears in the Query box.
-
The connection string is case sensitive.
-
You can whitelist a database connection string. If the Allow all setting under System > System settings > System > Whitelist is not enabled, you can only use the whitelisted database connection strings. See Configure the server URLs and database connection strings.
-
-
Select
Save.
The newly created action is added to the table.
-
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.