Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Insert record Version 11 (Java)

Группа действийAction group: DtabasesDatabases

Описание действия

Добавляет запись (строку) в указанную таблицу БД. 

Иконка действия

Image Removed

Параметры

Входные параметры

  1. Контекст БД Контекст подключения к выбранной базе данных.

  2. Имя таблицы Имя таблицы в БД.

  3. Данные для вставки – Словарь данных для вставки в таблицу.

  4. Список имен полей первичного ключа – Список имен полей первичного ключа, который будет получен в результате.

Выходные параметры

В результате получаем Список значений первичного ключа, сгенерированных в результате вставки данных для полей.

...

Description

The action adds the text (string) in the given DB table. 

Action icon

Image Added

Parameters

Input parameters 

  1. DB context – connection context to the selected database.

  2. Table name – table name in DB.

  3. Insert data – data in the form of a dictionary for insertion into a table.

  4. List of primary key field names – list of primary key field names to be returned.

Output parameters

As a result we get the list of primary key values generated when inserting data for the field. 

Settings

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
DB contextConnection context to the selected databaseRobin.DbContextDatabase contextYes
Table nameTable nameRobin.String
Yes
Insert dataData in the form of a dictionary for insertion into a tableRobin.Dictionary
Yes
List of primary key field namesList of primary key field names to be returnedRobin.Collection
No
Results
List of primary key valuesList of primary key values generated as a result of inserting data for the fields specified in the «List of primary key field names» parameterRobin.Dictionary

Особые условия использования

Отсутствуют.

Пример использования 

Задача



Special conditions of use 

None.

Example of use

Task

Connect to the database and insert data in the table (columns Подключиться к базе данных и добавить данные в таблицу (столбцы AGENT_NAME,  WORKINGWORKING_AREA,  COMMISSIONCOMMISSION,  PHONEPHONE_NO и NO and COUNTRY) . ДанныеData:  LucidaLucida,  MumbaiMumbai,  00.13,  077077-12346674, USA.

image2024-2-12_11-24-57.png

...

Solution

Воспользоваться действиями Use the "Connect Standard Db", "InsertRecord" actions

Реализация

Implementation

  1. Assemble a robot scheme consisting of actions
    Image Added
  2. Set the parameters for "Connect Standard" action
  3. Собрать робота, состоящего из действий:
    Image Removed
  4. Настроить параметры для действия "Стандартное подключение"
    image2024-2-12_11-23-8.png
  5. Настроить параметры для действия Set the parameters for "Insert Record" action

    В поле In the "Insert data" указать данные в виде словаряfield use data in the form of dictionary

    В поле In the "List of primary key field names" заполнить следующим образомfield fill in the following manner:  
  6. Нажать на кнопку "Старт" в верхней панелиClick the "Start" button in the top panel

Результат

Result

The program robot completed successfullyПрограммный робот отработал успешно.

Новая запись добавлена в таблицуNew text inserted in the table