宝刀不老8天下大同:asp标准表达式中数据类型不匹配。/第 38 行

来源:百度文库 编辑:高校问答 时间:2024/04/24 03:45:40
<!--#include file="incs/disdbconn.asp"-->
<%
backweb=request.servervariables("http_referer")
whos=request.form("whos")
whos=trim(whos)
username=request.form("username")
password=request("password")
if username="" or password="" then
response.write "<script language=javascript>alert('请填写用户名和密码!');"
response.write "window.history.go(-1);</script>"
response.end
end if

if username<>"" and password<>"" then
if whos="会员" then
sql="select * from info_mem where uname='"&username&"'"
set rs=server.createobject("ADODB.RecordSet")

rs.open sql,conn,1,3
if rs.bof or rs.eof then
response.write"<SCRIPT language=JavaScript>alert('没有该用户,请重新输入!');"
response.write"this.location.href='"&backweb&"';</SCRIPT>"
else
rpassword=rs("upass")
rname=rs("rname")
nick=rs("nick")
if password=rpassword then
id=rs("id")
logcount=rs("logcount")
logcount=logcount+1
rs("logcount")=logcount
rs.update
session("userid")=id
session("username")=rname
session("nick")=nick
theids=session.SessionID
session("tuserid")=id
conn.execute("update bbsonline set userid='"&id&"',username='"&nick&"' where userid='"&theids&"'")
response.write"<SCRIPT language=JavaScript>alert('登陆成功!');"
response.write"this.location.href='"&backweb&"';</SCRIPT>"
else
response.write"<SCRIPT language=JavaScript>alert('密码错误,请返回重新输入!');"
response.write"this.location.href='"&backweb&"';</SCRIPT>"
end if
end if
rs.close
set rs=nothing

以下的省略.....

应该是

rpassword=rs("upass")
rname=rs("rname")
nick=rs("nick")
if password=rpassword then
id=rs("id")
logcount=rs("logcount")
logcount=logcount+1
rs("logcount")=logcount

这段变量里有些变量名在数据库里找不到。
或者你看看。。
logcount=rs("logcount")
logcount=logcount+1
rs("logcount")=logcount
这里是不是有问题。。。。可能要这样。你自己试吧
logcount=int(rs("logcount"))

类型不符合,看看数据库有没有这个字段,或者改为试一下 update bbsonline set userid='"&id&"',username='"&nick&"' where userid="&theids