日期:2014-05-17  浏览次数:20930 次

谁帮我看下执行sql语句为什么没执行成功呀!!是vbscript代码,谢谢!!!
sql   =   "select   *   from   hyclub   where   HyNumber   =   ' "   &   username   &   " '   and   Hypassword   =   ' "   &   password   &   " ' "
set   rs=WS_Setrs(sql,conn,1,1)
if   rs.RecordCount   > 0   then
if   rs( "IsApproved ")=true   then
session( "HyID ")     =   rs( "HyID ")
session( "HyNumber ")   =rs( "HyNumber ")   '
session( "addtime ")   =   rs( "addtime ")
session( "LoginNumber ")   =   rs( "LoginNumber ")   +   1
sqlupdate   =   "update   hyclub   set   LoginNumber= "   &   session( "LoginNumber ")   &   "   where   id= "   &   session( "HyID ")
set   rsupdate=WS_Setrs(sqlupdate,conn,1,3) '在这一行!为什么执行不成功呀,sql语句绝对没错,我已经打印出来粘贴到数据库里已经试过了,能执行成功的
sql   =   "select   *   from   Setting_other "
set   paramrs   =WS_Setrs(sql,conn,1,1)
if   paramrs.RecordCount   > 0   then
              ii=1
      Do   While   not   paramrs.eof   and   ii <=20
FuncName=paramrs( "FuncName ")
session(FuncName)=paramrs( "FuncValue ")
          if   ii> =20   then
                exit   do
            end   if
            paramrs.movenext
                    ii=ii+1
          loop

          end   if
Response.Redirect   "szsell_main.asp "

else
      Response.Write( " <script   language=javascript> alert( '未审核会员不允许登陆,请检查! ');history.go(-1); </script> ")
        Response.Write( "未审核会员不允许登陆,请检查! ' ")
response.End()

end   if
else

      Response.Write( " <script   language=javascript> alert( '会员帐号或者密码错误,请检查! ');history.go(-1);; </script> ")
      Response.Write( "会员帐号或者密码错误,请检查! ")
response.End()
end   if
    Closers   rsupdate
        Closers   paramrs
        Closers   rs
        CloseConn

%>

------解决方案--------------------
sqlupdate = "update hyclub set LoginNumber= ' " & session( "LoginNumber ") & " ' where id= ' " & session( "HyID ")& " ' "
这样试试!!
------解决方案--------------------
set rs=WS_Setrs(sql,conn,1,1)//请教WS_Setrs()指什么?
------解决方案--------------------
set rsupdate=WS_Setrs(sqlupdate,conn,1,3)
换成
WS_Setrs sqlupdate,conn,3,2
看看