C# Class MySql.Data.MySqlClient.MySqlCommand

Inheritance: ICloneable, IDisposable
Afficher le fichier Open project: elevate/mysqlconnector-.net Class Usage Examples

Private Properties

Свойство Type Description
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

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
CreateDbParameter ( ) : DbParameter
Dispose ( bool disposing ) : void
ExecuteDbDataReader ( CommandBehavior behavior ) : DbDataReader

Private Methods

Méthode Description
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

Method Details

BeginExecuteNonQuery() public méthode

Initiates the asynchronous execution of the SQL statement or stored procedure that is described by this MySqlCommand.
public BeginExecuteNonQuery ( ) : IAsyncResult
Résultat IAsyncResult

BeginExecuteNonQuery() public méthode

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.
Résultat IAsyncResult

BeginExecuteReader() public méthode

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
Résultat IAsyncResult

BeginExecuteReader() public méthode

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.
Résultat IAsyncResult

Cancel() public méthode

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
Résultat void

Clone() public méthode

Creates a clone of this MySqlCommand object. CommandText, Connection, and Transaction properties are included as well as the entire parameter list.
public Clone ( ) : MySqlCommand
Résultat MySqlCommand

CreateDbParameter() protected méthode

protected CreateDbParameter ( ) : DbParameter
Résultat DbParameter

CreateParameter() public méthode

Creates a new instance of a MySqlParameter object.
This method is a strongly-typed version of IDbCommand.CreateParameter.
public CreateParameter ( ) : MySqlParameter
Résultat MySqlParameter

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

EndExecuteNonQuery() public méthode

Finishes asynchronous execution of a SQL statement.
public EndExecuteNonQuery ( IAsyncResult asyncResult ) : int
asyncResult IAsyncResult The returned by the call /// to .
Résultat int

EndExecuteReader() public méthode

Finishes asynchronous execution of a SQL statement, returning the requested MySqlDataReader.
public EndExecuteReader ( IAsyncResult result ) : MySqlDataReader
result IAsyncResult The returned by the call to /// .
Résultat MySqlDataReader

ExecuteDbDataReader() protected méthode

protected ExecuteDbDataReader ( CommandBehavior behavior ) : DbDataReader
behavior CommandBehavior
Résultat DbDataReader

ExecuteNonQuery() public méthode

public ExecuteNonQuery ( ) : int
Résultat int

ExecuteReader() public méthode

public ExecuteReader ( ) : MySqlDataReader
Résultat MySqlDataReader

ExecuteReader() public méthode

public ExecuteReader ( CommandBehavior behavior ) : MySqlDataReader
behavior CommandBehavior
Résultat MySqlDataReader

ExecuteScalar() public méthode

public ExecuteScalar ( ) : object
Résultat object

MySqlCommand() public méthode

public MySqlCommand ( ) : System
Résultat System

MySqlCommand() public méthode

public MySqlCommand ( string cmdText ) : System
cmdText string
Résultat System

MySqlCommand() public méthode

public MySqlCommand ( string cmdText, MySqlConnection connection ) : System
cmdText string
connection MySqlConnection
Résultat System

MySqlCommand() public méthode

public MySqlCommand ( string cmdText, MySqlConnection connection, MySqlTransaction transaction ) : System
cmdText string
connection MySqlConnection
transaction MySqlTransaction
Résultat System

Prepare() public méthode

public Prepare ( ) : void
Résultat void