|
先来看看SqlDataAdapter中的所有成员 public sealed class SqlDataAdapter : DbDataAdapter, IDbDataAdapter, IDataAdapter, ICloneable { // Events public event SqlRowUpdatedEventHandler RowUpdated; public event SqlRowUpdatingEventHandler RowUpdating;
// Methods public SqlDataAdapter(); public SqlDataAdapter(SqlCommand selectCommand); private SqlDataAdapter(SqlDataAdapter adapter); public SqlDataAdapter(string selectCommandText, SqlConnection selectConnection); public SqlDataAdapter(string selectCommandText, string selectConnectionString); protected override RowUpdatedEventArgs CreateRowUpdatedEvent(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping); protected override RowUpdatingEventArgs CreateRowUpdatingEvent(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping); protected override void Dispose(bool disposing); protected override void OnRowUpdated(RowUpdatedEventArgs value); protected override void OnRowUpdating(RowUpdatingEventArgs value); IDbCommand IDbDataAdapter.get_DeleteCommand(); IDbCommand IDbDataAdapter.get_InsertCommand(); IDbCommand IDbDataAdapter.get_SelectCommand(); IDbCommand IDbDataAdapter.get_UpdateCommand(); void IDbDataAdapter.set_DeleteCommand(IDbCommand value); void IDbDataAdapter.set_InsertCommand(IDbCommand value); void IDbDataAdapter.set_SelectCommand(IDbCommand value); void IDbDataAdapter.set_UpdateCommand(IDbCommand value); object ICloneable.Clone();
// Properties public SqlCommand DeleteCommand { get; set; } public SqlCommand InsertCommand { get; set; } public SqlCommand SelectCommand { get; set; } public SqlCommand UpdateCommand { get; set; }
// Fields private SqlCommand cmdDelete; private SqlCommand cmdInsert; private SqlCommand cmdSelect; private SqlCommand cmdUpdate; private SqlCommand internalCmdSelect; } 其中并没有Fill方法,那么它从哪里来呢?想必是从它的父类DbDataAdapter中继承而来的那就 看看DbDataAdapter中的所有成员 public abstract class DbDataAdapter : DataAdapter, ICloneable { // Events public event FillErrorEventHandler FillError;
// Methods static DbDataAdapter(); protected DbDataAdapter(); protected DbDataAdapter(DbDataAdapter adapter); private static DataTable[] AddDataTableToArray(DataTable[] tables, DataTable newTable); private IDbCommand CloneCommand(IDbCommand command); protected abstract RowUpdatedEventArgs CreateRowUpdatedEvent(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping); protected abstract RowUpdatingEventArgs CreateRowUpdatingEvent(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping); protected override void Dispose(bool disposing); public override int Fill(DataSet dataSet); public int Fill(DataTable dataTable); public int Fill(DataSet dataSet, string srcTable); protected virtual int Fill(DataTable dataTable, IDataReader dataReader); protected virtual int Fill(DataTable dataTable, IDbCommand command, CommandBehavior behavior); public int Fill(DataSet dataSet, int startRecord, int maxRecords, string srcTable); protected virtual int Fill(DataSet dataSet, string srcTable, IDataReader dataReader, int startRecord, int maxRecords); protected virtual int Fill(DataSet dataSet, int startRecord, int maxRecords, string srcTable, IDbCommand command, CommandBehavior behavior); private void FillErrorHandler(Exception e, DataTable dataTable, object[] dataValues); private int FillFromCommand(object data, int startRecord, int maxRecords, string srcTable, IDbCommand command, CommandBehavior behavior); internal int FillFromReader(object data, string srcTable, IDataReader dataReader, int startRecord, int maxRecords, DataColumn parentChapterColumn, object parentChapterValue); private int FillLoadDataRow(SchemaMapping mapping); private int FillLoadDataRowChunk(SchemaMapping mapping, int startRecord, int maxRecords); private bool FillNextResult(IDataReader dataReader); public override DataTable[] FillSchema(DataSet dataSet, SchemaType schemaType); public DataTable FillSchema(DataTable dataTable, SchemaType schemaType); public DataTable[] FillSchema(DataSet dataSet, SchemaType schemaType, string srcTable); protected virtual DataTable FillSchema(DataTable dataTable, SchemaType schemaType, IDbCommand command, CommandBehavior behavior); protected virtual DataTable[] FillSchema(DataSet dataSet, SchemaType schemaType, IDbCommand command, string srcTable, CommandBehavior behavior); private DataTable[] FillSchemaFromCommand(object data, SchemaType schemaType, IDbCommand command, string srcTable, CommandBehavior behavior); private SchemaMapping FillSchemaMapping(object data, string srcTable, IDataReader dataReader, int schemaCount, DataColumn parentChapterColumn, object parentChapterValue); private SchemaMapping FillSchemaMappingTry(object data, string srcTable, IDataReader dataReader, int schemaCount, DataColumn parentChapterColumn, object parentChapterValue); private static IDbConnection GetConnection(IDbCommand command, string method); public override IDataParameter[] GetFillParameters(); private static DataRowVersion GetParameterSourceVersion(StatementType typeIndex, IDataParameter parameter); internal static string GetSourceTableName(string srcTable, int index); protected virtual void OnFillError(FillErrorEventArgs value); protected abstract void OnRowUpdated(RowUpdatedEventArgs value); protected abstract void OnRowUpdating(RowUpdatingEventArgs [1] [2] [3] 下一页 [办公软件]在sybase中插入图片、PDF、文本文件 [办公软件]安装Sybase ASE [办公软件]linux指令大全(完整篇) [办公软件]Linux新手入门常用命令大全 [办公软件]在RedHat Linux 9里安装gaim0.80 [办公软件]浅谈Linux 下Java 1.5 汉字方块问题解决方法 [办公软件]Linux程序员必读:中文化与GB18030标准 [办公软件]linux指令大全 [办公软件]制作Linux启动盘的四种方法 [办公软件]Linux文件系统的反删除方法
|