C# Класс MySql.Data.MySqlClient.MySqlCommand

Наследование: ICloneable, IDisposable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AddToBatch void
AsyncExecuteWrapper object
CheckState void
ClearCommandTimer void
Close void
EstimatedSize long
GetCommandTextForBatching string
HandleCommandBehaviors void
ICloneable object
Prepare void
ResetReader void
ResetSqlSelectLimit void
TrimSemicolons string

Открытые методы

Метод Описание
BeginExecuteNonQuery ( ) : IAsyncResult

Initiates the asynchronous execution of the SQL statement or stored procedure that is described by this MySqlCommand.

BeginExecuteNonQuery ( AsyncCallback callback, object stateObject ) : IAsyncResult

Initiates the asynchronous execution of the SQL statement or stored procedure that is described by this MySqlCommand.

BeginExecuteReader ( ) : IAsyncResult

Initiates the asynchronous execution of the SQL statement or stored procedure that is described by this MySqlCommand, and retrieves one or more result sets from the server.

BeginExecuteReader ( CommandBehavior behavior ) : IAsyncResult

Initiates the asynchronous execution of the SQL statement or stored procedure that is described by this MySqlCommand using one of the CommandBehavior values.

Cancel ( ) : void

Attempts to cancel the execution of a currently active command

Cancelling a currently active query only works with MySQL versions 5.0.0 and higher.

Clone ( ) : MySqlCommand

Creates a clone of this MySqlCommand object. CommandText, Connection, and Transaction properties are included as well as the entire parameter list.

CreateParameter ( ) : MySqlParameter

Creates a new instance of a MySqlParameter object.

This method is a strongly-typed version of IDbCommand.CreateParameter.

EndExecuteNonQuery ( IAsyncResult asyncResult ) : int

Finishes asynchronous execution of a SQL statement.

EndExecuteReader ( IAsyncResult result ) : MySqlDataReader

Finishes asynchronous execution of a SQL statement, returning the requested MySqlDataReader.

ExecuteNonQuery ( ) : int
ExecuteReader ( ) : MySqlDataReader
ExecuteReader ( CommandBehavior behavior ) : MySqlDataReader
ExecuteScalar ( ) : object
MySqlCommand ( ) : System
MySqlCommand ( string cmdText ) : System
MySqlCommand ( string cmdText, MySqlConnection connection ) : System
MySqlCommand ( string cmdText, MySqlConnection connection, MySqlTransaction transaction ) : System
Prepare ( ) : void

Защищенные методы

Метод Описание
CreateDbParameter ( ) : DbParameter
Dispose ( bool disposing ) : void
ExecuteDbDataReader ( CommandBehavior behavior ) : DbDataReader

Приватные методы

Метод Описание
AddToBatch ( MySqlCommand command ) : void
AsyncExecuteWrapper ( int type, CommandBehavior behavior ) : object
CheckState ( ) : void

Check the connection to make sure - it is open - it is not currently being used by a reader - and we have the right version of MySQL for the requested command type

ClearCommandTimer ( ) : void
Close ( MySqlDataReader reader ) : void
EstimatedSize ( ) : long
GetCommandTextForBatching ( ) : string
HandleCommandBehaviors ( CommandBehavior behavior ) : void
ICloneable ( ) : object
Prepare ( int cursorPageSize ) : void
ResetReader ( ) : void

Reset reader to null, to avoid "There is already an open data reader" on the next ExecuteReader(). Used in error handling scenarios.

ResetSqlSelectLimit ( ) : void

Reset SQL_SELECT_LIMIT that could have been modified by CommandBehavior.

TrimSemicolons ( string sql ) : string

Описание методов

BeginExecuteNonQuery() публичный Метод

Initiates the asynchronous execution of the SQL statement or stored procedure that is described by this MySqlCommand.
public BeginExecuteNonQuery ( ) : IAsyncResult
Результат IAsyncResult

BeginExecuteNonQuery() публичный Метод

Initiates the asynchronous execution of the SQL statement or stored procedure that is described by this MySqlCommand.
public BeginExecuteNonQuery ( AsyncCallback callback, object stateObject ) : IAsyncResult
callback AsyncCallback /// An delegate that is invoked when the command's /// execution has completed. Pass a null reference (Nothing in Visual Basic) /// to indicate that no callback is required.
stateObject object A user-defined state object that is passed to the /// callback procedure. Retrieve this object from within the callback procedure /// using the property.
Результат IAsyncResult

BeginExecuteReader() публичный Метод

Initiates the asynchronous execution of the SQL statement or stored procedure that is described by this MySqlCommand, and retrieves one or more result sets from the server.
public BeginExecuteReader ( ) : IAsyncResult
Результат IAsyncResult

BeginExecuteReader() публичный Метод

Initiates the asynchronous execution of the SQL statement or stored procedure that is described by this MySqlCommand using one of the CommandBehavior values.
public BeginExecuteReader ( CommandBehavior behavior ) : IAsyncResult
behavior CommandBehavior One of the values, indicating /// options for statement execution and data retrieval.
Результат IAsyncResult

Cancel() публичный Метод

Attempts to cancel the execution of a currently active command
Cancelling a currently active query only works with MySQL versions 5.0.0 and higher.
public Cancel ( ) : void
Результат void

Clone() публичный Метод

Creates a clone of this MySqlCommand object. CommandText, Connection, and Transaction properties are included as well as the entire parameter list.
public Clone ( ) : MySqlCommand
Результат MySqlCommand

CreateDbParameter() защищенный Метод

protected CreateDbParameter ( ) : DbParameter
Результат DbParameter

CreateParameter() публичный Метод

Creates a new instance of a MySqlParameter object.
This method is a strongly-typed version of IDbCommand.CreateParameter.
public CreateParameter ( ) : MySqlParameter
Результат MySqlParameter

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

EndExecuteNonQuery() публичный Метод

Finishes asynchronous execution of a SQL statement.
public EndExecuteNonQuery ( IAsyncResult asyncResult ) : int
asyncResult IAsyncResult The returned by the call /// to .
Результат int

EndExecuteReader() публичный Метод

Finishes asynchronous execution of a SQL statement, returning the requested MySqlDataReader.
public EndExecuteReader ( IAsyncResult result ) : MySqlDataReader
result IAsyncResult The returned by the call to /// .
Результат MySqlDataReader

ExecuteDbDataReader() защищенный Метод

protected ExecuteDbDataReader ( CommandBehavior behavior ) : DbDataReader
behavior CommandBehavior
Результат DbDataReader

ExecuteNonQuery() публичный Метод

public ExecuteNonQuery ( ) : int
Результат int

ExecuteReader() публичный Метод

public ExecuteReader ( ) : MySqlDataReader
Результат MySqlDataReader

ExecuteReader() публичный Метод

public ExecuteReader ( CommandBehavior behavior ) : MySqlDataReader
behavior CommandBehavior
Результат MySqlDataReader

ExecuteScalar() публичный Метод

public ExecuteScalar ( ) : object
Результат object

MySqlCommand() публичный Метод

public MySqlCommand ( ) : System
Результат System

MySqlCommand() публичный Метод

public MySqlCommand ( string cmdText ) : System
cmdText string
Результат System

MySqlCommand() публичный Метод

public MySqlCommand ( string cmdText, MySqlConnection connection ) : System
cmdText string
connection MySqlConnection
Результат System

MySqlCommand() публичный Метод

public MySqlCommand ( string cmdText, MySqlConnection connection, MySqlTransaction transaction ) : System
cmdText string
connection MySqlConnection
transaction MySqlTransaction
Результат System

Prepare() публичный Метод

public Prepare ( ) : void
Результат void