DB query to use stored procedures of a database

Create a database query to use stored procedures of a database.

  1. On the DB query action dialog box of a form, click Configure.
    The DBQuery dialog box is displayed.
  2. 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.

  3. On the Type list, select Stored procedures. (Default: Tables)
  4. 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.
  5. Map the parameters (members/properties) using dynamic or static values.

    It is mandatory to specify values for all the columns/parameters.

  6. 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:

      1. Click .

      2. Enter a name for the result set column.

        Column name should be same as database column name.

      3. Select a variable, control (form/global), or field on the Value list.

      4. Click Add.

      5. To add more columns to the result set, repeat the preceding steps.

  7. Click OK.

    The DB query action dialog box displays the Query.

  8. Click Save.

    At runtime, the data in the stored procedure is retrieved and appears in the respective columns of the table.