Add records to a database table
Create a database query to add records to a database table.
-
On the properties panel of the
Data access activity, click
Configure.
The Data access configuration <Activity number> dialog box is displayed.
-
You can select one of the following for
Database connection.
-
Local (Default): Select the process or server variable to specify the database connection string that holds the details of the relational database.
-
External: To use the database connection from external storage, enter the secret name for the connection secret stored in the configured external storage.
By default, the Tables option is selected and all tables within the selected database are available on the Tables list.
-
- On the Tables list, select the table to add records for. All columns within the selected table appear under Available columns.
- On the Record list, select Add.
- On the Available columns list, select the columns to add records to and click .
- Provide static or dynamic values for the selected columns.
-
To insert multiple records in a table at runtime:
In the Properties panel of the Table control > General tab, ensure the Multi-select and Add and modify properties are selected.
- On the Database query page, select the Perform multiple inserts option.
-
Select either option:
-
Insert all rows: Inserts all rows for the selected columns.
-
Insert selected rows: Inserts selected rows for the selected columns.
Multiple selection of rows is available only if you create a DB query action on forms. -
- For information on selection criteria and the DB query outcome, see Insert multiple records into a database.
- On the Return rows affected to list, select the variable.
- Click OK.