错误描述:在 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 + "'");

相关文章:

  • 2022-12-23
  • 2021-04-02
  • 2021-10-20
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
猜你喜欢
  • 2021-09-07
  • 2021-06-10
  • 2021-06-07
  • 2022-12-23
  • 2021-12-23
  • 2021-12-12
相关资源
相似解决方案