Skip to end of metadata
Go to start of metadata

 

← Back to the available automatic tasks list

 
 In case of any problems with understanding how the automatic task works, check:  Automatic taskConditional executionComponent 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 NameFrom versionDescriptionParameter typeDefault valueField typeComments and restricitons
Database*1.0.4Configuration 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. 
First, the action tries to search for a table from the system base. If the search fails, a search is made in the defined database.
Text Editable fieldThe 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
Parameter conditioning the type of database query. There are 2 options to choose from:
  • Select data- parameter for queries returning data, for example SELECT,
  • Update data- parameter for data updating queries, for example INSERT, UPDATE, DROP.
TextSelect dataList of values 
Query name*1.0.4
ID of the query stored in the database.
Text Editable field 
Query parameters1.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 fieldSince version 1.0.24 it is possible not to pass any parameters to the query.
Target variables 1.0.4Array 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 fieldOn 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.11An 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:

Wartość wyświetlanaWartość przekazywana
Throw exceptionBlock

Get first value

First
Get unique values separated by semicolonUnique
Overwrite data 1.0.21The parameter determines whether to overwrite data in the columns of the dynamic table.LogicalNoEditable field 
Suspend acceptance on error1.0.110The parameter defines whether to interrupt the acceptance in case of an error (throw the exception next).LogicalNoEditable fieldOnly 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

  • Adding component (application)

1.0.4

  • Adding component (setter)

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

  • Support for passing parameters with space - adding "" and '' interpretations

1.0.11

  • Adding a Multiple values handling parameter 

1.0.12

  • Fixed converter error for tabular text

1.0.14

  • New comment support, improved date setting

1.0.15

  • Logs adding

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

  • Improved error throwing if the variable passed in the parameter is not found

1.0.64

  • New database support

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





  • No labels
Write a comment…