C# Class MySql.Data.MySqlClient.MySqlDataAdapter

Inheritance: System.Data.Common.DbDataAdapter, IDbDataAdapter, IDataAdapter, ICloneable
Mostrar archivo Open project: elevate/mysqlconnector-.net Class Usage Examples

Private Properties

Property Type Description
OpenConnectionIfClosed void

Public Methods

Method Description
MySqlDataAdapter ( ) : System
MySqlDataAdapter ( MySqlCommand selectCommand ) : System
MySqlDataAdapter ( string selectCommandText, MySqlConnection connection ) : System
MySqlDataAdapter ( string selectCommandText, string selectConnString ) : System

Protected Methods

Method Description
AddToBatch ( IDbCommand command ) : int
ClearBatch ( ) : void
CreateRowUpdatedEvent ( DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping ) : RowUpdatedEventArgs

Overridden. See DbDataAdapter.CreateRowUpdatedEvent.

CreateRowUpdatingEvent ( DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping ) : RowUpdatingEventArgs

Overridden. See DbDataAdapter.CreateRowUpdatingEvent.

ExecuteBatch ( ) : int
GetBatchedParameter ( int commandIdentifier, int parameterIndex ) : IDataParameter
InitializeBatching ( ) : void
OnRowUpdated ( RowUpdatedEventArgs value ) : void

Overridden. Raises the RowUpdated event.

OnRowUpdating ( RowUpdatingEventArgs value ) : void

Overridden. Raises the RowUpdating event.

TerminateBatching ( ) : void
Update ( DataRow dataRows, DataTableMapping tableMapping ) : int

Private Methods

Method Description
OpenConnectionIfClosed ( DataRowState state, List openedConnections ) : void

Open connection if it was closed. Necessary to workaround "connection must be open and valid" error with batched updates.

Method Details

AddToBatch() protected method

protected AddToBatch ( IDbCommand command ) : int
command IDbCommand
return int

ClearBatch() protected method

protected ClearBatch ( ) : void
return void

CreateRowUpdatedEvent() protected method

Overridden. See DbDataAdapter.CreateRowUpdatedEvent.
protected CreateRowUpdatedEvent ( DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping ) : RowUpdatedEventArgs
dataRow System.Data.DataRow
command IDbCommand
statementType StatementType
tableMapping System.Data.Common.DataTableMapping
return System.Data.Common.RowUpdatedEventArgs

CreateRowUpdatingEvent() protected method

Overridden. See DbDataAdapter.CreateRowUpdatingEvent.
protected CreateRowUpdatingEvent ( DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping ) : RowUpdatingEventArgs
dataRow System.Data.DataRow
command IDbCommand
statementType StatementType
tableMapping System.Data.Common.DataTableMapping
return System.Data.Common.RowUpdatingEventArgs

ExecuteBatch() protected method

protected ExecuteBatch ( ) : int
return int

GetBatchedParameter() protected method

protected GetBatchedParameter ( int commandIdentifier, int parameterIndex ) : IDataParameter
commandIdentifier int
parameterIndex int
return IDataParameter

InitializeBatching() protected method

protected InitializeBatching ( ) : void
return void

MySqlDataAdapter() public method

public MySqlDataAdapter ( ) : System
return System

MySqlDataAdapter() public method

public MySqlDataAdapter ( MySqlCommand selectCommand ) : System
selectCommand MySqlCommand
return System

MySqlDataAdapter() public method

public MySqlDataAdapter ( string selectCommandText, MySqlConnection connection ) : System
selectCommandText string
connection MySqlConnection
return System

MySqlDataAdapter() public method

public MySqlDataAdapter ( string selectCommandText, string selectConnString ) : System
selectCommandText string
selectConnString string
return System

OnRowUpdated() protected method

Overridden. Raises the RowUpdated event.
protected OnRowUpdated ( RowUpdatedEventArgs value ) : void
value System.Data.Common.RowUpdatedEventArgs A MySqlRowUpdatedEventArgs that contains the event data.
return void

OnRowUpdating() protected method

Overridden. Raises the RowUpdating event.
protected OnRowUpdating ( RowUpdatingEventArgs value ) : void
value System.Data.Common.RowUpdatingEventArgs A MySqlRowUpdatingEventArgs that contains the event data.
return void

TerminateBatching() protected method

protected TerminateBatching ( ) : void
return void

Update() protected method

protected Update ( DataRow dataRows, DataTableMapping tableMapping ) : int
dataRows System.Data.DataRow
tableMapping System.Data.Common.DataTableMapping
return int