另外 必须使用 Command 取回数据, 再使用 Adapter fill 一下吗 ?

解决方案 »

  1.   

    这个是BETA版的程序了,现在已经没有System.Data.SQL这个了。改下程序了。SqlConnectioncnSQL = new SqlConnection(strConn);
    SqlCommand cmdSQL= new SqlCommand(strSQL,cnSQL);
       
    DataSet ds = new DataSet();
    cmdSQL.Fill(ds,"Employees");
      

  2.   

    另外 必须使用 Command 取回数据, 再使用 Adapter fill 一下吗 ?
      

  3.   

    SqlDataSetCommand是在当初Beta版里的类,现在己改名为SqlDataAdapter
    了。
    另外,SqlCommand是没有Fill方法的。
      

  4.   

    哇,不好意思,上面我写的代码错了,晕,没仔细看 :(应该用SqlDataAdapter