XenoGuard Documentation

Insert Table

Actions » Windows » Database » Insert Table 

The action Insert Table adds a new record into the database table.


[-] Hide
  1. Open the Windows node in the Workspace Explorer.
  2. Open the Database node, select the Insert Table action.

Parameters:

The action has the following input parameters:


name Description
Connection String
The string used to authenticate and connect to the database.

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Type [Variable, Parameter, Enum]
Table
The name of the table where the data is to be inserted.

Allowed Context Scope [Fixed, Local, Global]
Allowed Context Type [Variable, Parameter, Enum]
Insert Values
The collection of fields and values to be inserted.

Parameters for the Set sub-branch:

  • Field - the column name for the value
  • Value - the data to be inserted
  • Type - the data type of the value (Text, Number, or Float)
Allowed Context Scope [Fixed, Local, Global]
Allowed Context Type [Variable, Parameter, Enum]

Information The "Provider" and "Data Source" must be included in the string to ensure an established connection.

Results:

The action returns the following results:


name
description
Success
The returned boolean result of the operation.

Allowed Context Scope [Fixed]
Inserted ID
The generated ID of the inserted data.

Allowed Context Scope [Fixed]

Example 1 (Add a record into the database):

This example creates three local variables, Name, CreditScore, and Status with Text as data type. The values were then inserted after successfully connecting to the database. Field values from the 'profiles' table were filtered to only show the added record. A notice that the record was successfully added is displayed via Message Box.

Example 2 (Add multiple records into the database):

This example creates a connection to the 'testdb.accdb' database and inserts multiple records into the 'profiles' table when the connection is successful. If records were added to the database table, contents of the table are shown, and a notice is displayed in Message Box.

Example 3 (Add records into the database from an Excel file):

This example establishes a connection to "employeedb.accdb" database and creates the "employees" table. Data are then retrieved and iterated from the Excel file which is later inserted into the database table. Once data has been inserted, a notice is displayed via Message Box.


See other database operations:

Create Connection
Create Table
Select Table
Update Table
Delete Table