SQL query component
Description
Allows to perform actions in the database, as well as to pass parameters (to input and to output).
Scenario variables act as parameters.
Connection to the database server is performed by the connection string. The database is accessed via ODBC and requires the appropriate drivers in the OS.
In case of an error, the transition is performed along the "Error" branch, and the corresponding database exception code is returned to the "Error code" variable.
Return values from the database are returned in tabular form. The values are saved to variables based on the identity of the column names in the last returned dataset and scenario variables. Variables are assigned values from the last row of the last dataset.
Index |
|
Short title |
|
Types of scenarios |
|
Starter module |
|
Mode |
Asynchronous |
Icon |
![]() |
Branching pattern |
Branching, closing |
Properties
Specification | Description |
---|---|
Title: |
DB to connect to.
|
Title: |
Possible options:
For the |
Title: |
Database connection string. Example for odbc driver
Driver={SQL Server Native Client 11.0}; Server=192.168.0.73,14350; Database=testbase; UID=test; PWD=123; Example for psql driver
Driver={PostgreSQL Unicode(x64)}; Server=127.0.0.1; Port=5433; Database=era_dummy_central_common; Uid=erapgadmin; Pwd=123456; or similar to the format in the configuration:
host:127.0.0.1,port:5432,login:erapgadmin,pwd:123456,database:postgres |
Title: |
Database query execution timeout. |
Title: |
SQL query body. Example for ODBC:
INSERT INTO EMPLOYEE (NR, FIRSTNAME, LASTNAME, GENDER) VALUES (?, ?, ?, ?) Example for PSQL:
SELECT name as a, birthdate::varchar as b,Where id = $1 or code = $2 If the query returns a table of values from multiple rows, an arbitrary row is stored in variables. The returned special values null, true, false are converted to string representation when saved to script variables. |
Title: |
A list value that sets the parameters for the query. The order of parameters strictly corresponds to the order in which the parameters are applied in the query. |
Title: |
Encoding in which to save string values in variables.
|
Title: |
Variable to store the error code. |
Title: |
Variable to store the name of the error. |
Title: |
The component to which control is passed after successful completion of the request. |
Title: |
The component to which control is passed after the timeout expires before a response to the request is received. |
Title: |
The component to which control is passed if an error occurs in preparing or executing a request. |
See also
-
role svc