DatabaseExecute Method (String, ExecuteOptions, 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 public int Execute(
string statement,
ExecuteOptions options,
string tableName,
string primaryKeyValue,
ref int identityValue
)
Public Function Execute (
statement As String,
options As ExecuteOptions,
tableName As String,
primaryKeyValue As String,
ByRef identityValue As Integer
) As Integer
Parameters
- statement
- Type: SystemString
The statement to execute. - options
- Type: NetQuarryExecuteOptions
Options about how to execute the Statement. - tableName
- Type: SystemString
The table being affected by the Statement. - primaryKeyValue
- Type: SystemString
The value of the primary key of the row affected by the Statement. - identityValue
- Type: SystemInt32
A reference to an integer that will hold the value of the identity.
Return Value
Type:
Int32The number of rows affected (for INSERT, UPDATE, DELETE statements)
Implements
IDatabaseExecute(String, ExecuteOptions, String, String, Int32)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