ExecuteReader: CommandText 属性尚未初始化,线等,立结!!!急!急!
ICollection CreateSource(string sqlSel)
{
SqlConnection conn=new SqlConnection(Application["conn"].ToString());
int StartIndex;
StartIndex = CurrentPage*PageSize;
SqlDataAdapter MyAdapter = new SqlDataAdapter(sqlSel,conn);
DataSet ds = new DataSet();
MyAdapter.Fill(ds,StartIndex,PageSize,"files");//这行报错
return ds.Tables["files"].DefaultView;
}
这是datagrid的数据绑定,自己加分页,以前没问题,今天突然抱错了。我没有用SqlCommand,怎么回这样抱错?求救。