do while not es.eof
zwgz=zwgz+rs("职务工资")
rs.movenext
loop
多简单!
StrSQL="select sum(职务工资) as 工资 ,字段名 from 在职工资表 where 工种='"&zglx&"' Order By 编号 asc"
就可以了
StrSQL="select sum(职务工资) from 在职工资表 where 工种='"&zglx&"' Order By 编号 asc"
这样改,然后用response.write rs(0)就能显示了!