直接用SqlDataAdapter。Fill不就行了吗?
  
*****************************************************************************
签名档: http://feiyun0112.cnblogs.com/

解决方案 »

  1.   


     SqlConnection conn = new SqlConnection("连接字符串");
                DataTable dt = new DataTable();
                SqlDataAdapter adapter = new SqlDataAdapter();
                adapter.SelectCommand = new SqlCommand();
                adapter.SelectCommand.Connection = conn;
                adapter.SelectCommand.CommandText = "select A,B from table";
                adapter.SelectCommand.CommandType = CommandType.Text;
                adapter.Fill(dt);