Sub Activity – Database
It involves connecting to a database and executing query and non-query operations to retrieve, insert, or update data within automation workflows.
The Database category has the following sub activities:
Connect Database: This activity is used to Connect to a database by using a connection string.
Connection Properties:
- ConnectionString: Specify the connection string to establish a database connection.
- Provider: Name of the database provider used to connect to the database.
Output Properties:
- Connection: Stores the established database connection.
Execute NonQuery: The ExecuteNonQuery activity enables you to execute SQL statements such as INSERT, UPDATE, or DELETE data in a given database.
Connection Properties:
- ExistingConnection: Specify a previously established database connection from the Connect Database activity.
- ConnectionString: Specify the connection string used to establish a database connection.
- Provider: Name of the database provider used to connect to the database.
Input Properties:
- SqlText: The SQL command to be executed. This field is determined by the CommandType property.
- CommandType: Select how the SQL command is interpreted (e.g., Text, StoredProcedure).
- Parameters– Collection of named parameters bound to the SQL command.
Output Properties:
- AffectedRecords: Returns the number of rows affected by the execution of the SQL command.
Execute Query: This activity is used to execute query operations on a database.
Connection Properties:
- ExistingConnection: Specify a previously established database connection from the Connect Database activity.
- ConnectionString: Specify the connection string used to establish a database connection.
- Provider: Name of the database provider used to connect to the database.
Input Properties:
- SqlText: The SQL command to be executed. This field is determined by the CommandType property.
- CommandType: Select how the SQL command is interpreted (e.g., Text, StoredProcedure).
- Parameters: Collection of named parameters bound to the SQL command.
Output Properties:
- Datatable: Stores the result of the executed SQL command in a DataTable variable.