DataTable dta = null;
dta = DBHelp.getDataTable("select reg_date,reg_count from Register_Info where customer='" + customer_excel + "'");
reg_date 为注册日期
reg_count 为注册次数
现在已经知 dta 里面有两条记录,我想里面取出 reg_count=2 的记录
怎么取?
dta = DBHelp.getDataTable("select reg_date,reg_count from Register_Info where customer='" + customer_excel + "'");
reg_date 为注册日期
reg_count 为注册次数
现在已经知 dta 里面有两条记录,我想里面取出 reg_count=2 的记录
怎么取?
foreach(DataRow row in dta.Rows)
{
if (Convert.ToInt32(row["reg_count"]) == 2)
{
}
}
dr=dta.select("reg_count=2");
dr就是你要去的行的集合。
dr=dta.select("reg_count=2");