ExecuteStatement (IDatabaseService)
Executes a query or update statement against a database connection, and provides for returning results in either the actual format(s) of the specified parameter(s) or in string format.
In the Configure Method dialog box, click Next to select whether you want to use an existing statement or configure a new statement. In the latter case, clicking the corresponding Edit link opens a dialog box, where you can specify the statement type and provider and then configure the statement itself. Next, specify whether you want results returned in the actual format(s) of the parameter(s) in question (Return typed values, the default) or string format (Return values as strings), and then click Finish.
Note: Beginning with release 2.2 SP1, this method includes a new parameter (ConvertValues) that allows you to specify whether returned values should be automatically converted to string format, as was done in past releases. Prior implementations of this method will continue to function as in the past.
Inputs | Data Type | Description |
---|---|---|
Connection | DirectoryResources | Specifies the database connection that is used to execute a particular statement. |
Statement | StatementInfo | Specifies the statement information to execute:
|
ConvertValues | Boolean | Specifies whether to convert returned values to string format. Options are as follows:
|
Outputs | Data Type | Description |
---|---|---|
ReturnValue | StatementExecutionResult | The execution result, including execution time, affected rows, and collection of DataTable (Result), of the statement against a particular database. Affected rows are provided based on statement type, particularly when StatementType is Update. Note: Data transfer limit: 10 MB. |