mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
* System.Data/DataTableCollection.cs:
Fix an issue when adding a DataTable and size == 0.
Now explicitly checks if size > 0 before doing Array.Copy ()
* System.Data.Common/DbDataAdapter.cs:
Move closer to a working implementation.
Make the IDbCommand fields protected so that they can
be inherited.
* System.Data.SqlClient/SqlDataAdapter.cs:
This should inherit the IDbCommands instead of having its
own. An explicit cast is used to force conversion between
IDbCommand and SqlCommand
svn path=/trunk/mcs/; revision=4588
118 lines
2.7 KiB
C#
118 lines
2.7 KiB
C#
//
|
|
// System.Data.SqlClient.SqlDataAdapter.cs
|
|
//
|
|
// Author:
|
|
// Rodrigo Moya ([email protected])
|
|
// Daniel Morgan ([email protected])
|
|
// Tim Coleman ([email protected])
|
|
//
|
|
// (C) Ximian, Inc 2002
|
|
// Copyright (C) 2002 Tim Coleman
|
|
//
|
|
|
|
using System;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Data.Common;
|
|
|
|
namespace System.Data.SqlClient
|
|
{
|
|
/// <summary>
|
|
/// Represents a set of command-related properties that are used
|
|
/// to fill the DataSet and update a data source, all this
|
|
/// from a SQL database.
|
|
/// </summary>
|
|
public sealed class SqlDataAdapter : DbDataAdapter
|
|
{
|
|
#region Constructors
|
|
|
|
public SqlDataAdapter ()
|
|
: this (new SqlCommand ())
|
|
{
|
|
}
|
|
|
|
public SqlDataAdapter (SqlCommand selectCommand)
|
|
{
|
|
this.deleteCommand = new SqlCommand ();
|
|
this.insertCommand = new SqlCommand ();
|
|
this.selectCommand = selectCommand;
|
|
this.updateCommand = new SqlCommand ();
|
|
this.isDirty = true;
|
|
}
|
|
|
|
public SqlDataAdapter (string selectCommandText, SqlConnection selectConnection)
|
|
: this (new SqlCommand (selectCommandText, selectConnection))
|
|
{
|
|
}
|
|
|
|
public SqlDataAdapter (string selectCommandText, string selectConnectionString)
|
|
: this (selectCommandText, new SqlConnection (selectConnectionString))
|
|
{
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
public new SqlCommand DeleteCommand {
|
|
get { return (SqlCommand)deleteCommand; }
|
|
set { deleteCommand = value; }
|
|
}
|
|
|
|
public new SqlCommand InsertCommand {
|
|
get { return (SqlCommand)insertCommand; }
|
|
set { insertCommand = value; }
|
|
}
|
|
|
|
public new SqlCommand SelectCommand {
|
|
get { return (SqlCommand)selectCommand; }
|
|
set {
|
|
this.isDirty = true;
|
|
selectCommand = value;
|
|
}
|
|
}
|
|
|
|
public new SqlCommand UpdateCommand {
|
|
get { return (SqlCommand)updateCommand; }
|
|
set { updateCommand = value; }
|
|
}
|
|
|
|
#endregion // Properties
|
|
|
|
#region Methods
|
|
|
|
[MonoTODO]
|
|
protected override RowUpdatedEventArgs CreateRowUpdatedEvent (DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
|
|
{
|
|
throw new NotImplementedException ();
|
|
}
|
|
|
|
|
|
[MonoTODO]
|
|
protected override RowUpdatingEventArgs CreateRowUpdatingEvent (DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
|
|
{
|
|
throw new NotImplementedException ();
|
|
}
|
|
|
|
protected override void OnRowUpdated (RowUpdatedEventArgs value)
|
|
{
|
|
throw new NotImplementedException ();
|
|
}
|
|
|
|
protected override void OnRowUpdating (RowUpdatingEventArgs value)
|
|
{
|
|
throw new NotImplementedException ();
|
|
}
|
|
|
|
#endregion // Methods
|
|
|
|
#region Events and Delegates
|
|
|
|
public event SqlRowUpdatedEventHandler RowUpdated;
|
|
public event SqlRowUpdatingEventHandler RowUpdating;
|
|
|
|
#endregion // Events and Delegates
|
|
|
|
}
|
|
}
|