在 Range 对象中,Min (12)必须小于或等于 max (-1)。
错误描述:在 Range 对象中,Min (12)必须小于或等于 max (-1)。
DataSet ds = new DataSet();
try
{
ds.ReadXml(Application.StartupPath + "\\T_Category.xml");
}
catch (IOException ioe)
{
throw ioe;
}
DataTable dt = ds.Tables[0];
DataRow[] drs = dt.Select("Id=" + categoryID );
解决方法:将参数用单引号阔起来
DataRow[] drs = dt.Select("Id='" + categoryID + "'");

浙公网安备 33010602011771号