asp中不获得记录集,获得统计结果如何做?
rs2.open "SELECT ISNULL(MAX(xuqiu3_jhsj), '') AS kssj, ISNULL(MIN(xuqiu3_jhsj), '') AS jssj FROM xuqiu3 WHERE (xuqiu3_del = 0) AND (xuqiu3_lbid = 1) AND (xuqiu3_reid = "&xqid&")",conntmp,1,3
ttmax =rs2("kssj")
ttmin =rs2("jssj")
rs2.close
上面的语句是正确的,但我想赋值到变量里,该怎么得到呢?
------解决方案--------------------sql="SELECT ISNULL(MAX(xuqiu3_jhsj), '') AS kssj, ISNULL(MIN(xuqiu3_jhsj), '') AS jssj FROM xuqiu3 WHERE (xuqiu3_del = 0) AND (xuqiu3_lbid = 1) AND (xuqiu3_reid = "&xqid&")"
ttmax =conn.execute(sql)(0)
ttmin =conn.execute(sql)(1)