История страницы
...
Connect standard Db Version 11 (Java)
Группа действий: Базы данных
Описание
Создает контекст подключения к стандартной базе данных.
Иконка действия
Параметры
Входные параметры
Тип СУБД – СУБД, к которой будет выполнено подключение.
Логин – Логин для подключения БД.
Пароль – Пароль для подключения БД.
Хост сервера – Имя сервера, на котором развёрнута СУБД.
Порт сервера – Порт сервера, на котором развёрнута СУБД.
Имя БД - Имя БД.
Тайм-аут - Предельное время ожидания подключения к БД.
Уровень изоляции транзакций - режим использования транзакций внутри подключения.
Параметры - Дополнительные параметры подключения.
Выходные параметры
В результате получаем контекст подключения для работы с БД.
Настройки
Action group: Databases
...
Description
Creates a connection context to the standard database
More details can be found here: Instructions on how to connect to Microsoft SQL Server from Robin Studio
Action icon
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
DATABASE TYPE | DB type | Robin.String | Yes | |
Login | Login to connect the database | Robin.String | No | |
Password | Password to connect the database | Robin.Object | No | |
Server host | Server host | Robin.String | No | |
Server port | Server port | Robin.Numeric | No | |
DB name | DB name | Robin.String | No | |
Timeout | Time limit for connection creation. Further it is used as the maximum waiting time for the execution of requests in the connection. The default is 60 s. May depend on driver implementation. | Robin.Numeric | No | |
Transaction isolation level | Enable the mode of using transactions inside the connection |
Свойство
Описание
Тип
Пример заполнения
Обязательность заполнения поля
Параметры
Тип СУБД
Тип СУБД
Robin.String
Да
Логин
Логин для подключения БД
Robin.String
Нет
Пароль
Пароль для подключения БД
Robin.Object
Нет
Хост сервера
Хост сервера
Robin.String
Нет
Порт сервера
Порт сервера
Robin.Numeric
Нет
Имя БД
Имя БД
Robin.String
Нет
Тайм-аут
Предельное время ожидания создания подключения. Далее используется, как предельное время ожидания выполнения запросов в подключении. По умолчанию 60 с. Может зависеть от реализации драйвера.
Robin.Numeric
Нет
Уровень изоляции транзакций
Robin.Boolean | true |
No |
Параметры
Parameters | Additional connection parameters in the form of a dictionary | Robin.Dictionary |
No |
Results |
Контекст
DB context | Connection context to the selected database | Robin.DbContext |
Контекст баз данных
Особые условия использования
Database context |
Special conditions of use
The difference between custom connection and standard connection is that with standard connection you can connect only to 1 of 4 available databases Разница между пользовательским подключением стандартным подключением заключается в том, что с помощью стандартного подключения можно подключиться только к 1 из 4-х доступных БД (Oracle, MySql, PostgreSql, MsSqlServer) , с помощью пользовательского подключения можно подключиться к любой БД для которой установлен jdbc-драйвер.
Пример использования
Задача
, with custom connection you can connect to any database for which jdbc-driver is installed.
Example of use
Task
Connect to MsSqlServer database and execute the query Подключиться к базе данных MsSqlServer и выполнить запрос
SELECT * FROM Table1
ORDER BY id ASC;
Решение
Solution
Use the actions "Connect Standard DbВоспользоваться действиями "Стандартное подключение", "Выполнить запросExecute Sql Statement".
Реализация
...
Implementation
- Assemble a robot scheme consisting of actions:
- Configure the settings 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 IP of the host where the database is installed or by host name.
Specify the Server port, as well as the DB 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 checkbox "Transaction isolation level" is activated, part of the executed queries to the database will be in the form of transactions. - Set the parameters for the "Execute Sql Statement" action.
- Click on the "Start" button in the top panel.
Result
The program robot completed successfully. The request has been fulfilled.
...
Результат
Программный робот отработал успешно. Запрос выполнен.