Select Record Version 11 (Java)
Action group: Databases
Description
The action retrieves a record from the specified database table by the value of its primary key
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
DB context | Connection context to the selected database | Robin.DbContext | Database context | Yes |
Table name | Table name | Robin.String | Yes | |
Table fields | Fields of the table as a collection, the data of which you want to get | Robin.Collection | No | |
Primary key value | The value of the primary key of the table record from which you want to get data | Robin.Dictionary | Yes | |
Results | ||||
Data record | The retrieved dictionary entry, where keys are the column names specified in the query | Robin.Dictionary |
Special conditions of use
None.
Example of use
Task
Connect to the database and retrieve data on one row of the table by columns AGENT_NAME, WORKING_AREA, COMMISSION, PHONE_NO and COUNTRY (ID=5).
Solution
Use "Connect Standard Db", "Select Record", "Data entry form" actions
Implementation
- Assemble a robot scheme consisting of actions:
- Fill in the parameters for the "Connect Standard DB" action.
In the "Database type" field, select the appropriate database to which you want to connect.
Specify the database login and password.
The server host can be specified either by the IP of the host where the database is installed or by the host name.
Specify the server port, as well as the database name.
In the "Timeout" field, the value is calculated in seconds.
In the "Parameters" field specify additional parameters for connection, usually these are parameters that relate to security. Parameters are specified in the form of a dictionary.
Learn more about the "Transaction isolation level" parameter. Sequential database operations can be divided into transactions. A transaction is a group of operations that represent a certain boolean unit of work with the database. For example, it is necessary to perform several operations with a table in order to update the data in it. If an error occurs, you can roll back the transaction, i.e. a group of operations made, so that you don't have to figure out at which step this error occurred.
If the "Transaction isolation level" checkbox is activated, a part of the executed queries to the database will be in the form of transactions. - Set the parameters for the "Select Record" action.
In the "Table fields" field specify the fields for which you want to get data
In the "Primary key value" field, specify row 5 - Set the parameters for the "Data entry form" action.
- Click on the "Start" button in the top panel.
Result
The program robot completed successfully.
The data from line 5 has been extracted.
Обзор
Инструменты контента