mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 01:41:17 -10:00
* System.Data.Common/DbDataAdapter.cs:
- More implementation of Fill methods
- Get rid of isDirty flag, because we can just check
if the table exists
- Do *not* remove DataTables before Filling them
- Implicitly open the connection before doing a Fill
if it does not exist.
* System.Data.SqlClient/SqlDataAdapter.cs:
- Minor fixup
* System.Data/DataTableCollection.cs:
- Add DataSet to internal, undocumented constructor
- When a table is created, set its DataSet property
- Default table name for creation is "Table1" (see .NET)
- Inherit the ArrayList list from InternalDataCollecitonBase
and maintain a hashtable between table names and
DataTables
* System.Data/DataTable.cs:
- Add internal dataSet field. This is used by
DataTableCollection when the DataTable is constructed.
* System.Data/DataSet.cs:
- Pass a reference to the DataSet when constructing the
DataTableCollection.
svn path=/trunk/mcs/; revision=4722
114 lines
2.7 KiB
C#
114 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) : base ()
|
|
{
|
|
this.deleteCommand = new SqlCommand ();
|
|
this.insertCommand = new SqlCommand ();
|
|
this.selectCommand = selectCommand;
|
|
this.updateCommand = new SqlCommand ();
|
|
}
|
|
|
|
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 { 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
|
|
|
|
}
|
|
}
|