- UiPath.Activities.Api.Base
- UiPath.Studio.Activities.Api
- UiPath.Studio.Activities.Api.Activities
- UiPath.Studio.Activities.Api.BusyService
- UiPath.Studio.Activities.Api.ExpressionEditor
- UiPath.Studio.Activities.Api.Expressions
- UiPath.Studio.Activities.Api.Licensing
- UiPath.Studio.Activities.Api.Mocking
- UiPath.Studio.Activities.Api.ObjectLibrary
- UiPath.Studio.Activities.Api.PackageBindings
- UiPath.Studio.Activities.Api.ProjectProperties
- UiPath.Studio.Activities.Api.ScopedActivities
- UiPath.Studio.Activities.Api.Settings
- UiPath.Studio.Activities.Api.Wizards
- UiPath.Studio.Activities.Api.Workflow
- UiPath.Studio.Api.Controls
- UiPath.Studio.Api.Telemetry
- UiPath.Studio.Api.Theme
Execute Query
UiPath.Database.Activities.ExecuteQuery
Executes a query on a database and returns the query result in a Datatable.
Properties
Common
-
ContinueOnError - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (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.
Note: If this activity is included in Try Catch and the value of the ContinueOnError property is True, no error is caught when the project is executed. - DisplayName - The display name of the activity. This field supports only
String
variables. -
Timeout - Specifies the amount of time (in millisecond) to wait for the sql command to run before an error is thrown. The default value is 30000 milliseconds (30 seconds) and must be greater than or equal to 0. This field supports only
Int32
variables.Note: The amount of time specified in this field does not include the response time for the query result retrieval. This means that the total execution time of the activity may be greater than the actual query execution time, to which the TimeoutMS property applies.
Connection Configuration
- ProviderName - The name of the database provider used to access the database. This field supports only
String
variables. - ConnectionString - The connection string used to establish a database connection. This field supports only
String
variables. - Existing Connection - An already opened database connection obtained from the Connect or Start Transaction activities. If such a connection is
provided, the ConnectionString and SecureConnectionString properties are ignored. This field supports only
DatabaseConnection
variables. - SecureConnectionString - The connection string used to establish a database connection as Secure String. This field supports only
SecureString
variables.
Input
- Parameters - A dictionary of named parameters that are bound to the sql command. The binding is done by specifying the
@parameterName
statement in the sql command. At runtime the parameterName will be replaced with its value from the dictionary. - Sql - An sql command to be executed. This field must be completed according to the selection from the CommandType property. This
field supports only
String
variables.
Misc
-
CommandType - Specifies how a command string is interpreted. The following options are available:
- Text - Executes the query given in the SQL parameter.
- StoredProcedure - Invokes the procedure name specified in the SQL parameter.
- TableDirect - Invokes all records from a table.
- Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
Output
- DataTable - The output of the SQL command wrapped in a DataTable variable.