Insert
UiPath.Database.Activities.InsertDataTable
Description
Inserts a compatible DataTable in an existing database table. Returns the number of rows affected.
important
The Insert activity uses a DataAdapter to automatically generate the proper insert/update queries, based on the database schema. In order to generate the queries, ODBC implements standard schema calls. Make sure the database you are using implements standard schema calls, otherwise the activity might not work properly.
Project compatibility
Windows - Legacy | Windows | Cross-platform
Windows - Legacy, Windows configuration
Designer panel
- Configure Connection... - Select an existing database connection or add a new one using the Connection Wizard.
- Target table name - The SQL table in which the data is to be inserted. This field supports only
Stringvariables. - Input data table - The
DataTablevariable that will be inserted into the Table. TheDataTablecolumns' name and description must match the ones from the database table.
Properties panel
Common
- Continue on error - Specifies if the automation should continue even when the activity throws an error. This field only supports
Booleanvalues (True, False). The default value is False. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.noteIf this activity is included in Try Catch and the value of the Continue on error property is True, no error is caught when the project is executed.
- DisplayName - The display name of the activity. This field supports only
Stringvariables.
Connection Configuration
- Connection string - The connection string used to establish a database connection. This field supports only
Stringvariables. - Existing connection - An already opened database connection obtained from the Connect or Start Transaction activities. If such a connection is provided, the
ConnectionStringandSecureConnectionStringproperties are ignored. This field supports onlyDatabaseConnectionvariables. - Provider name - The name of the database provider used to access the database. This field supports only
Stringvariables. - Secure connection string - The connection string used to establish a database connection as Secure String. This field supports only
SecureStringvariables.
Input
- Input data table - The
DataTablevariable that will be inserted into the Table. TheDataTablecolumns' name and description must match the ones from the database table. - Target table name - The SQL table in which the data is to be inserted. This field supports only
Stringvariables.
Misc
- Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
Output
- Affected rows count - Stores the number of affected rows into an
Int32variable.
Cross-platform configuration
- Existing connection - An already opened database connection obtained from the Connect to Database activity.
- Input data table - The
DataTablevariable that will be inserted into the Table. TheDataTablecolumns' name and description must match the ones from the database table. - Target table name - The target database table in which the data is to be inserted.
Advanced options
Other
- Continue on error - Specifies if the automation should continue even when the activity throws an error.
Output
- Affected rows count - Number of affected rows.