← Back to the available automatic tasks list
In case of any problems with understanding how the automatic task works, check: Automatic task, Conditional execution, Component parameters
Basic info
Category: Database
Available from version: 1.0.2 (application) 1.0.4 (setter)
Description
Component retrieves SQL query from database, passes it and assigns the results to variables that identify the appropriate column aliases in the database. Places in the database query, where values with range through parameters marked with "?" Are available. When specifying several parameters, where each of the values that decide the order of parameter definition will go. If no data were returned from the database, the component does not set any values.
Configuration parameters
Parameter Name | From version | Description | Parameter type | Default value | Field type | Comments and restricitons | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Database* | 1.0.4 | Configuration name defined in the data explorer settings. | Text | Editable field | ||||||||||
Query table | 1.0.4 | The name of the table in which queries triggered by the application are stored. The table should contain the query_name (query ID) and query (query only) columns. | Text | Editable field | The parameter is optional. If we do not fill it, the question is taken from here: Tabela z zapytaniami do bazy | |||||||||
Type of query* | x.x |
| Text | Select data | List of values | |||||||||
Query name* | 1.0.4 | Text | Editable field | |||||||||||
Query parameters | 1.0.4 | An array of text values storing variables / constants for query parameters and type information. An example parameter is "value type" for constants and "@id_variable" for variables. When we want to pass a constant value that has more than one word, we write it in quotation marks "" or "'. Supported types are: string, integer and float. | Text array | Editable field | Since version 1.0.24 it is possible not to pass any parameters to the query. | |||||||||
Target variables | 1.0.4 | Array of variables into which the values from the database are to reach. Binding based on the variable id and returned alias from the database. | Variable array | Editable field | On the Oracle database, we will not set a logical type variable due to the lack of a corresponding type in the database. | |||||||||
Multiple values handling | 1.0.11 | An optional parameter that allows handling of many values returned by the database dedicated to one header variable. | Text | List of values | Possible values of parameter:
| |||||||||
Overwrite data | 1.0.21 | The parameter determines whether to overwrite data in the columns of the dynamic table. | Logical | No | Editable field | |||||||||
Suspend acceptance on error | 1.0.110 | The parameter defines whether to interrupt the acceptance in case of an error (throw the exception next). | Logical | No | Editable field | Only for a SETTER type component ("Mechanisms activated after acceptance") |
Sample configuration
- Type of query set to Select data
- Type of query set toUpdate data
Change log
1.0.2
1.0.4
1.0.10
- Setting the default query table to pm_dbqueries
1.0.21
- Adding overwrite parameter
1.0.49
- Fix for setting the integer value to Oracle
1.0.54
- Improved error handling when a column or table was not found
1.0.7
1.0.11
1.0.12
- Fixed converter error for tabular text
1.0.14
1.0.15
1.0.18
- Fixing the total column conversion error
1.0.24
- Added query support without parameters
1.0.25
- Improved throwing exceptions
1.0.63
1.0.64
1.0.65
- Correct handling of text parameters with "" and ''
x.x
- Support for INSERT and UPDATE queries
1.0.110
- Incorrect error handling in the "Execution of a query from the database" Setteer
Add Comment