Вы просматриваете старую версию данной страницы. Смотрите текущую версию.

Сравнить с текущим просмотр истории страницы

« Предыдущий Версия 11 Следующий »

Insert record Version 11 (Java)

Action group: Databases


Description

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

Action icon

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, WORKING_AREA, COMMISSION, PHONE_NO and COUNTRY) . Data: Lucida, Mumbai, 0.13, 077-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
  2. Set the parameters for "Connect Standard" action. 
    image2024-2-12_11-23-8.png
  3. 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:  
  4. Click the "Start" button in the top panel. 

Result

The program robot completed successfully.

New text inserted in the table. 

  • Нет меток