谢谢,但是我继续后那个还是没有,而且SqlDataAdapter就是从它继续来的,也没有这个东西出现
还请大侠接着帮忙

解决方案 »

  1.   

    楼主有没有搞错啊,该方法就是SqlDataAdapter的成员啊,仔细看一下重载的列表啊。
      

  2.   

    我知道它在重载列表里面,但是不能用呀
    请不要责备我:( public bool testFill()
    {
    DataSet result = new DataSet();

    DataTable table = new DataTable();
    SqlCommand command = new SqlCommand("select * from scripts",conn);

    SqlDataAdapter adapter = new SqlDataAdapter();
    adapter.Fill(table,command,CommandBehavior.SequentialAccess);
    }
    ------------------------------------------------------------------
    c:\documents and settings\libo\my documents\visual studio projects\dataio\dataio.cs(307,4): error CS0122: 不可访问“System.Data.Common.DbDataAdapter.Fill(System.Data.DataTable, System.Data.IDbCommand, System.Data.CommandBehavior)”,因为它受保护级别限制