DB query to use stored procedures of a database
Create a database query to use stored procedures of a database.
-
On the DB query action dialog box of a form, click
Configure.
The DBQuery dialog box is displayed.
-
To specify the database connection string that holds the details of the relational database, select either
Database connection.
-
Local (Default): Select a global variable or click to manually enter the connection string.
-
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 Type list displays Tables and all tables within the selected database appear on the Tables list.
-
- On the Type list, select Stored procedures. (Default: Tables)
- On the Stored procedures list, select the database procedure to be used in the query. For example, to get the stored procedure for the "Jobs duration overrun" query, select awsp_GetJobsDurationOverrun.
-
Map the parameters (members/properties) using dynamic or static values.
It is mandatory to specify values for all the columns/parameters.
-
To configure the
Return result set to, select either of the following:
-
Single control (default): Select a single control.
-
Multiple controls: To map the multiple controls, do the following:
-
Click .
-
Enter a name for the result set column.
Column name should be same as database column name.
-
Select a variable, control (form/global), or field on the Value list.
-
Click Add.
-
To add more columns to the result set, repeat the preceding steps.
-
-
-
Click
OK.
The DB query action dialog box displays the Query.
-
Click
Save.
At runtime, the data in the stored procedure is retrieved and appears in the respective columns of the table.