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
-
On the form modeling bar, click
Actions and click
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.
-
To create a DB query, click
Configure.
The query (<query name>) dialog box is displayed.
-
Configure the query. See
Create a DB query.
Once a query is created, it appears in the Query box.
Note-
The connection string is case sensitive.
-
You can whitelist a database connection string. If Allow all in the system settings is not enabled, you can only use the whitelisted database connection strings. See Configure the server URLs and database connection strings.
-
-
Click
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.
See also: