为什么不返回值
function cc(str)
dim i
i=0
set rs_l=server.CreateObject( "ADODB.RecordSet ")
sql_l= "select * from t where id= "&str
rs_l.open sql_l,conn,1,1
do while not rs_l.eof
if rs_l( "a ")> rs_l( "b ") then
i=i+1
end if
rs_l.movenext
loop
cc=i
rs_l.close
end function
运行后返回值为空,不知道什么原因?
------解决方案--------------------哦
错了!!!
function cc(id)
cc = conn.Execute( "select Count(*) from t where id= " & id & " and a> b ",,&h0001)(0)
end function