转至繁体中文版     | 网站首页 | 文章中心 | 下载中心 | 图片中心 | 笑话频道 | 教程频道 | 会员中心 | 雁过留声 | 
最新公告:     "MinTao学以致用网"欢迎您的光临,你的支持便是我们的动力,欢迎广大网友和各界人士亲临指导,你们的一个小小的建议便是我们发展的开路石!  [MinTao  2007年9月5日]        
您现在的位置: MinTao学以致用网 >> 文章中心 >> 电子课堂 >> 数据库 >> Sql Server >> 文章正文
专题栏目
更多内容
最新推荐 更多内容
相关文章
SqlDataAdapter中的Fill
更多内容
SqlDataAdapter中Fill方法浅析         
SqlDataAdapter中Fill方法浅析
作者:thinkingforever 文章来源:不详 点击数: 更新时间:2007-11-14 11:58:45

先来看看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] 下一页

文章录入:mintao    责任编辑:mintao 
  • 上一篇文章:

  • 下一篇文章:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007 MinTao学以致用网(www.mintao.net) Inc All Rights Reserved.
    QQ:543098146有事请Q我! QQ:261561092有事请Q我 QQ:179647303有事请Q我 MSN:min906@126.com
    站长:MinTao 信息产业部ICP备案号:鄂ICP备07500065号

    学以致用是我们学习者的至高境界和不懈追求,[MinTao学以致用网]与大家共同学习,共同进步……
    信息产业部备案
    *鄂ICP备07500065号