请帮我看看这段很短的代码有什么问题
<%dim conn,rs,sqlstr,namesj,passsj,num
namesj=request.Form("namesj")
passsj=request.Form("passsj")
set conn=server.CreateObject("adodb.connection")
conn.open "dsn=asptest;Uid=sa;pwd="
sqlstr="select name,password,qx from login where name='" & namesj &"' and password='" & "passsj'"
conn.execute sqlstr,num
if num<=0 then
response.write "<p>用户名或密码错误,请返回重试!</p>"
else
response.write "<p>用户名是:" & namesj
response.write "<p>密码是:" & passsj
end if
conn.close
%>
不管我输入的用户名或密码是否正确都提示错误,请问怎么回事?如何才能通过SQL进行用户的难呢?我的那句SQL语句对不对呀,谢谢