日期:2014-05-19  浏览次数:20352 次

DataSet的问题
我要查DataSet中一个字段的所有值!这个字段下所有值的个数如何得到!要源码谢谢

------解决方案--------------------
//取一列的值
for(int j=0;j <DataSet.Tables[0].Rows.Count;j++)
{
string r+= DataSet.Tables[0].Rows[j][ "列名 "].ToString()+ "| ";
}
return r;

//计算个数
int i= DataSet.Tables[0].Rows.Count