Click or drag to resize

IDatabaseExecute Method (String, String, Int32)

You can use the Execute method to perform catalog operations (for example, creating database objects such as tables), or to change the data in a database without using a DataSet by executing UPDATE, INSERT, or DELETE statements.

For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1.

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
int Execute(
	string statement,
	string logSource,
	int commandTimeout
)

Parameters

statement
Type: SystemString
The statement to execute
logSource
Type: SystemString
The source of the operation, to be logged to the devlog.
commandTimeout
Type: SystemInt32
The command timeout for the execution (in seconds).

Return Value

Type: Int32
The number of rows affected (for INSERT, UPDATE, DELETE statements)
Remarks
The overloaded version of Execute allows for the statement to be logged to the xmt_transactions table. Note that you MUST have the table in the database that this object is connected to or this method will fail.
See Also