DataTable dt = ds.Tables[0]; DataRow[] drs = dt.Select("Id=" + categoryID );
解决方法:将参数用单引号阔起来
DataRow[] drs = dt.Select("Id='" + categoryID + "'");