Class MySqlDataAdapter
Represents a set of data commands and a database connection that are used to fill a dataset and update a MySQL database. This class cannot be inherited.
Inheritance
Implements
Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data.dll
Version: 9.3.0
Syntax
public sealed class MySqlDataAdapter : DbDataAdapter, IComponent, IDisposable, ICloneable, IDbDataAdapter, IDataAdapter
Remarks
The My
When the My
My
The My
When an instance of My
note
Please be aware that the System.
Examples
The following example creates a My
public DataSet SelectRows(DataSet dataset,string connection,string query)
{
MySqlConnection conn = new MySqlConnection(connection);
MySqlDataAdapter adapter = new MySqlDataAdapter();
adapter.SelectCommand = new MySqlCommand(query, conn);
adapter.Fill(dataset);
return dataset;
}
Constructors
MySqlDataAdapter()
Initializes a new instance of the My
Declaration
public MySqlDataAdapter()
Remarks
When an instance of My
Properties | Initial Value |
---|---|
System. |
System. |
System. |
System. |
You can change the value of any of these properties through a separate call to the property.
MySqlDataAdapter(MySqlCommand)
Initializes a new instance of the My
Declaration
public MySqlDataAdapter(MySqlCommand selectCommand)
Parameters
Type | Name | Description |
---|---|---|
My |
selectCommand | My |
MySqlDataAdapter(String, MySqlConnection)
Initializes a new instance of the My
Declaration
public MySqlDataAdapter(string selectCommandText, MySqlConnection connection)
Parameters
Type | Name | Description |
---|---|---|
System. |
selectCommandText | A String that is a SQL SELECT statement or stored procedure to be used by
the Select |
My |
connection | A My |
Remarks
This implementation of the My
MySqlDataAdapter(String, String)
Initializes a new instance of the My
Declaration
public MySqlDataAdapter(string selectCommandText, string selectConnString)
Parameters
Type | Name | Description |
---|---|---|
System. |
selectCommandText | A System. |
System. |
selectConnString | The connection string |
Properties
DeleteCommand
Gets or sets a SQL statement or stored procedure used to delete records from the data set.
Declaration
public MySqlCommand DeleteCommand { get; set; }
Property Value
Type | Description |
---|---|
My |
A My |
Remarks
During System.
When Delete
InsertCommand
Gets or sets a SQL statement or stored procedure used to insert records into the data set.
Declaration
public MySqlCommand InsertCommand { get; set; }
Property Value
Type | Description |
---|---|
My |
A My |
Remarks
During System.
When InsertCommand is assigned to a previously created My
note
If execution of this command returns rows, these rows may be added to the DataSet
depending on how you set the Updated
SelectCommand
Gets or sets a SQL statement or stored procedure used to select records in the data source.
Declaration
public MySqlCommand SelectCommand { get; set; }
Property Value
Type | Description |
---|---|
My |
A My |
Remarks
When Select
If the Select
UpdateBatchSize
Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.
Declaration
public override int UpdateBatchSize { get; set; }
Property Value
Type | Description |
---|---|
System. |
Overrides
Remarks
Returns the number of rows to process for each batch.
Value is | Effect |
---|---|
0 | There is no limit on the batch size. |
1 | Disables batch updating. |
> 1 |
Changes are sent using batches of Update |
When setting this to a value other than 1, all the commands associated with the My
UpdateCommand
Gets or sets a SQL statement or stored procedure used to updated records in the data source.
Declaration
public MySqlCommand UpdateCommand { get; set; }
Property Value
Type | Description |
---|---|
My |
A My |
Remarks
During System.
When Update
note
If execution of this command returns rows, these rows may be merged with the DataSet
depending on how you set the Updated
Methods
AddToBatch(IDbCommand)
Adds a System.
Declaration
protected override int AddToBatch(IDbCommand command)
Parameters
Type | Name | Description |
---|---|---|
System. |
command | The System. |
Returns
Type | Description |
---|---|
System. |
The number of commands in the batch before adding the System. |
Overrides
ClearBatch()
Removes all System.
Declaration
protected override void ClearBatch()
Overrides
CreateRowUpdatedEvent(DataRow, IDbCommand, StatementType, DataTableMapping)
Overridden. See System.
Declaration
protected override RowUpdatedEventArgs CreateRowUpdatedEvent(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataRow | |
System. |
command | |
System. |
statementType | |
System. |
tableMapping |
Returns
Type | Description |
---|---|
System. |
Overrides
CreateRowUpdatingEvent(DataRow, IDbCommand, StatementType, DataTableMapping)
Initializes a new instance of the System.
Declaration
protected override RowUpdatingEventArgs CreateRowUpdatingEvent(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataRow | The System. |
System. |
command | The System. |
System. |
statementType | Whether the command is an UPDATE, INSERT, DELETE, or SELECT statement. |
System. |
tableMapping | A System. |
Returns
Type | Description |
---|---|
System. |
Overrides
ExecuteBatch()
Executes the current batch.
Declaration
protected override int ExecuteBatch()
Returns
Type | Description |
---|---|
System. |
The return value from the last command in the batch. |
Overrides
FillAsync(DataSet)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataSet dataSet)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | The System. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(DataSet, Int32, Int32, String)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataSet dataSet, int startRecord, int maxRecords, string srcTable)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | The System. |
System. |
startRecord | The start record. |
System. |
maxRecords | The max number of affected records. |
System. |
srcTable | The name of the source table to use for table mapping. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(DataSet, Int32, Int32, String, IDbCommand, CommandBehavior)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataSet dataSet, int startRecord, int maxRecords, string srcTable, IDbCommand command, CommandBehavior behavior)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | The System. |
System. |
startRecord | The start record. |
System. |
maxRecords | The max number of affected records. |
System. |
srcTable | The name of the source table to use for table mapping. |
System. |
command | The SQL SELECT statement used to retrieve rows from the data source. |
System. |
behavior | One of the System. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(DataSet, Int32, Int32, String, IDbCommand, CommandBehavior, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataSet dataSet, int startRecord, int maxRecords, string srcTable, IDbCommand command, CommandBehavior behavior, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | The System. |
System. |
startRecord | The start record. |
System. |
maxRecords | The max number of affected records. |
System. |
srcTable | The name of the source table to use for table mapping. |
System. |
command | The SQL SELECT statement used to retrieve rows from the data source. |
System. |
behavior | One of the System. |
System. |
cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(DataSet, Int32, Int32, String, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataSet dataSet, int startRecord, int maxRecords, string srcTable, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | The System. |
System. |
startRecord | The start record. |
System. |
maxRecords | The max number of affected records. |
System. |
srcTable | The name of the source table to use for table mapping. |
System. |
cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(DataSet, String)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataSet dataSet, string srcTable)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | The System. |
System. |
srcTable | The name of the source table to use for table mapping. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(DataSet, String, IDataReader, Int32, Int32)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataSet dataSet, string srcTable, IDataReader dataReader, int startRecord, int maxRecords)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | The System. |
System. |
srcTable | The name of the source table to use for table mapping. |
System. |
dataReader | An instance of System. |
System. |
startRecord | The start record. |
System. |
maxRecords | The max number of affected records. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(DataSet, String, IDataReader, Int32, Int32, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataSet dataSet, string srcTable, IDataReader dataReader, int startRecord, int maxRecords, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | The System. |
System. |
srcTable | The name of the source table to use for table mapping. |
System. |
dataReader | An instance of System. |
System. |
startRecord | The start record. |
System. |
maxRecords | The max number of affected records. |
System. |
cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(DataSet, String, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataSet dataSet, string srcTable, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | The System. |
System. |
srcTable | The name of the source table to use for table mapping. |
System. |
cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(DataSet, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataSet dataSet, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | The System. |
System. |
cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(DataTable)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataTable dataTable)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataTable | The name of the System. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(DataTable, IDataReader)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataTable dataTable, IDataReader dataReader)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataTable | The System. |
System. |
dataReader | An instance of System. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(DataTable, IDataReader, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataTable dataTable, IDataReader dataReader, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataTable | The System. |
System. |
dataReader | An instance of System. |
System. |
cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(DataTable, IDbCommand, CommandBehavior)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataTable dataTable, IDbCommand command, CommandBehavior behavior)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataTable | The System. |
System. |
command | The SQL SELECT statement used to retrieve rows from the data source. |
System. |
behavior | One of the System. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(DataTable, IDbCommand, CommandBehavior, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataTable dataTable, IDbCommand command, CommandBehavior behavior, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataTable | The System. |
System. |
command | The SQL SELECT statement used to retrieve rows from the data source. |
System. |
behavior | One of the System. |
System. |
cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(DataTable, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataTable dataTable, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataTable | The name of the System. |
System. |
cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(DataTable[], Int32, Int32, IDbCommand, CommandBehavior)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataTable[] dataTables, int startRecord, int maxRecords, IDbCommand command, CommandBehavior behavior)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataTables | The System. |
System. |
startRecord | The start record. |
System. |
maxRecords | The max number of affected records. |
System. |
command | The SQL SELECT statement used to retrieve rows from the data source. |
System. |
behavior | One of the System. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(DataTable[], Int32, Int32, IDbCommand, CommandBehavior, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(DataTable[] dataTables, int startRecord, int maxRecords, IDbCommand command, CommandBehavior behavior, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataTables | The System. |
System. |
startRecord | The start record. |
System. |
maxRecords | The max number of affected records. |
System. |
command | The SQL SELECT statement used to retrieve rows from the data source. |
System. |
behavior | One of the System. |
System. |
cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(Int32, Int32, DataTable[])
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(int startRecord, int maxRecords, params DataTable[] dataTables)
Parameters
Type | Name | Description |
---|---|---|
System. |
startRecord | The start record. |
System. |
maxRecords | The max number of affected records. |
System. |
dataTables | The System. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillAsync(Int32, Int32, CancellationToken, DataTable[])
Asynchronous version of the System.
Declaration
public Task<int> FillAsync(int startRecord, int maxRecords, CancellationToken cancellationToken, params DataTable[] dataTables)
Parameters
Type | Name | Description |
---|---|---|
System. |
startRecord | The start record. |
System. |
maxRecords | The max number of affected records. |
System. |
cancellationToken | The cancellation token. |
System. |
dataTables | The System. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully added to or refreshed in the System. |
FillSchemaAsync(DataSet, SchemaType)
Asynchronous version of the System.
Declaration
public Task<DataTable[]> FillSchemaAsync(DataSet dataSet, SchemaType schemaType)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | DataSet to use. |
System. |
schemaType | Schema type to use. |
Returns
Type | Description |
---|---|
System. |
System. |
FillSchemaAsync(DataSet, SchemaType, IDbCommand, String, CommandBehavior)
Asynchronous version of the System.
Declaration
public Task<DataTable[]> FillSchemaAsync(DataSet dataSet, SchemaType schemaType, IDbCommand command, string srcTable, CommandBehavior behavior)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | DataSet to use. |
System. |
schemaType | Schema type to use. |
System. |
command | DBCommand to use. |
System. |
srcTable | Source table to use. |
System. |
behavior | Command Behavior |
Returns
Type | Description |
---|---|
System. |
System. |
FillSchemaAsync(DataSet, SchemaType, IDbCommand, String, CommandBehavior, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<DataTable[]> FillSchemaAsync(DataSet dataSet, SchemaType schemaType, IDbCommand command, string srcTable, CommandBehavior behavior, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | DataSet to use. |
System. |
schemaType | Schema type to use. |
System. |
command | DBCommand to use. |
System. |
srcTable | Source table to use. |
System. |
behavior | Command Behavior |
System. |
cancellationToken | System. |
Returns
Type | Description |
---|---|
System. |
System. |
FillSchemaAsync(DataSet, SchemaType, String)
Asynchronous version of the System.
Declaration
public Task<DataTable[]> FillSchemaAsync(DataSet dataSet, SchemaType schemaType, string srcTable)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | DataSet to use. |
System. |
schemaType | Schema type to use. |
System. |
srcTable | Source table to use. |
Returns
Type | Description |
---|---|
System. |
System. |
FillSchemaAsync(DataSet, SchemaType, String, IDataReader)
Asynchronous version of the System.
Declaration
public Task<DataTable[]> FillSchemaAsync(DataSet dataSet, SchemaType schemaType, string srcTable, IDataReader dataReader)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | DataSet to use. |
System. |
schemaType | Schema type to use. |
System. |
srcTable | Source table to use. |
System. |
dataReader | DataReader to use. |
Returns
Type | Description |
---|---|
System. |
System. |
FillSchemaAsync(DataSet, SchemaType, String, IDataReader, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<DataTable[]> FillSchemaAsync(DataSet dataSet, SchemaType schemaType, string srcTable, IDataReader dataReader, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | DataSet to use. |
System. |
schemaType | Schema type to use. |
System. |
srcTable | Source table to use. |
System. |
dataReader | System. |
System. |
cancellationToken | System. |
Returns
Type | Description |
---|---|
System. |
System. |
FillSchemaAsync(DataSet, SchemaType, String, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<DataTable[]> FillSchemaAsync(DataSet dataSet, SchemaType schemaType, string srcTable, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | DataSet to use. |
System. |
schemaType | Schema type to use. |
System. |
srcTable | Source table to use. |
System. |
cancellationToken | System. |
Returns
Type | Description |
---|---|
System. |
System. |
FillSchemaAsync(DataSet, SchemaType, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<DataTable[]> FillSchemaAsync(DataSet dataSet, SchemaType schemaType, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | DataSet to use. |
System. |
schemaType | Schema type to use. |
System. |
cancellationToken | System. |
Returns
Type | Description |
---|---|
System. |
System. |
FillSchemaAsync(DataTable, SchemaType)
Asynchronous version of the System.
Declaration
public Task<DataTable> FillSchemaAsync(DataTable dataTable, SchemaType schemaType)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataTable | DataTable to use. |
System. |
schemaType | Schema type to use. |
Returns
Type | Description |
---|---|
System. |
DataTable |
FillSchemaAsync(DataTable, SchemaType, IDataReader)
Asynchronous version of the System.
Declaration
public Task<DataTable> FillSchemaAsync(DataTable dataTable, SchemaType schemaType, IDataReader dataReader)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataTable | DataTable to use. |
System. |
schemaType | Schema type to use. |
System. |
dataReader | DataReader to use. |
Returns
Type | Description |
---|---|
System. |
System. |
FillSchemaAsync(DataTable, SchemaType, IDataReader, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<DataTable> FillSchemaAsync(DataTable dataTable, SchemaType schemaType, IDataReader dataReader, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataTable | DataTable to use. |
System. |
schemaType | Schema type to use. |
System. |
dataReader | DataReader to use. |
System. |
cancellationToken | System. |
Returns
Type | Description |
---|---|
System. |
System. |
FillSchemaAsync(DataTable, SchemaType, IDbCommand, CommandBehavior)
Asynchronous version of the System.
Declaration
public Task<DataTable> FillSchemaAsync(DataTable dataTable, SchemaType schemaType, IDbCommand command, CommandBehavior behavior)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataTable | DataTable to use. |
System. |
schemaType | Schema type to use. |
System. |
command | DBCommand to use. |
System. |
behavior | Command Behavior |
Returns
Type | Description |
---|---|
System. |
System. |
FillSchemaAsync(DataTable, SchemaType, IDbCommand, CommandBehavior, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<DataTable> FillSchemaAsync(DataTable dataTable, SchemaType schemaType, IDbCommand command, CommandBehavior behavior, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataTable | DataTable to use. |
System. |
schemaType | Schema type to use. |
System. |
command | DBCommand to use. |
System. |
behavior | Command behavior. |
System. |
cancellationToken | System. |
Returns
Type | Description |
---|---|
System. |
System. |
FillSchemaAsync(DataTable, SchemaType, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<DataTable> FillSchemaAsync(DataTable dataTable, SchemaType schemaType, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataTable | DataTable to use. |
System. |
schemaType | Schema type to use. |
System. |
cancellationToken | System. |
Returns
Type | Description |
---|---|
System. |
System. |
GetBatchedParameter(Int32, Int32)
Returns a System.Data.IDataParameter from one of the commands in the current batch.
Declaration
protected override IDataParameter GetBatchedParameter(int commandIdentifier, int parameterIndex)
Parameters
Type | Name | Description |
---|---|---|
System. |
commandIdentifier | The index of the command to retrieve the parameter from. |
System. |
parameterIndex | The index of the parameter within the command. |
Returns
Type | Description |
---|---|
System. |
The System. |
Overrides
InitializeBatching()
Initializes batching for the My
Declaration
protected override void InitializeBatching()
Overrides
OnRowUpdated(RowUpdatedEventArgs)
Overridden. Raises the RowUpdated event.
Declaration
protected override void OnRowUpdated(RowUpdatedEventArgs value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | A MySqlRowUpdatedEventArgs that contains the event data. |
Overrides
OnRowUpdating(RowUpdatingEventArgs)
Overridden. Raises the RowUpdating event.
Declaration
protected override void OnRowUpdating(RowUpdatingEventArgs value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | A MySqlRowUpdatingEventArgs that contains the event data. |
Overrides
TerminateBatching()
Ends batching for the My
Declaration
protected override void TerminateBatching()
Overrides
Update(DataRow[], DataTableMapping)
Declaration
protected override int Update(DataRow[] dataRows, DataTableMapping tableMapping)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataRows | |
System. |
tableMapping |
Returns
Type | Description |
---|---|
System. |
Overrides
UpdateAsync(DataRow[])
Asynchronous version of the System.
Declaration
public Task<int> UpdateAsync(DataRow[] dataRows)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataRows | DataRow[] to use. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully updated from the System. |
UpdateAsync(DataRow[], DataTableMapping)
Asynchronous version of the System.
Declaration
public Task<int> UpdateAsync(DataRow[] dataRows, DataTableMapping tableMapping)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataRows | DataRow[] to use. |
System. |
tableMapping | Data Table Mapping |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully updated from the System. |
UpdateAsync(DataRow[], DataTableMapping, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<int> UpdateAsync(DataRow[] dataRows, DataTableMapping tableMapping, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataRows | DataRow[] to use. |
System. |
tableMapping | Data Table Mapping |
System. |
cancellationToken | System. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully updated from the System. |
UpdateAsync(DataRow[], CancellationToken)
Asynchronous version of the System.
Declaration
public Task<int> UpdateAsync(DataRow[] dataRows, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataRows | DataRow[] to use. |
System. |
cancellationToken | System. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully updated from the System. |
UpdateAsync(DataSet)
Asynchronous version of the System.
Declaration
public Task<int> UpdateAsync(DataSet dataSet)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | DataSet to use. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully updated from the System. |
UpdateAsync(DataSet, String)
Asynchronous version of the System.
Declaration
public Task<int> UpdateAsync(DataSet dataSet, string srcTable)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | DataSet to use. |
System. |
srcTable | Source table to use. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully updated from the System. |
UpdateAsync(DataSet, String, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<int> UpdateAsync(DataSet dataSet, string srcTable, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | DataSet to use. |
System. |
srcTable | Source table to use. |
System. |
cancellationToken | System. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully updated from the System. |
UpdateAsync(DataSet, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<int> UpdateAsync(DataSet dataSet, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataSet | DataSet to use. |
System. |
cancellationToken | System. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully updated from the System. |
UpdateAsync(DataTable)
Asynchronous version of the System.
Declaration
public Task<int> UpdateAsync(DataTable dataTable)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataTable | DataTable to use. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully updated from the System. |
UpdateAsync(DataTable, CancellationToken)
Asynchronous version of the System.
Declaration
public Task<int> UpdateAsync(DataTable dataTable, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System. |
dataTable | DataTable to use. |
System. |
cancellationToken | System. |
Returns
Type | Description |
---|---|
System. |
The number of rows successfully updated from the System. |
Events
RowUpdated
Occurs during Update after a command is executed against the data source. The attempt to update is made, so the event fires.
Declaration
public event MySqlRowUpdatedEventHandler RowUpdated
Event Type
Type | Description |
---|---|
My |
RowUpdating
Occurs during Update before a command is executed against the data source. The attempt to update is made, so the event fires.
Declaration
public event MySqlRowUpdatingEventHandler RowUpdating
Event Type
Type | Description |
---|---|
My |