ADODB.Recordset 错误 '800a0cc1' 5
<%ifrequest("car1")<>""orrequest("car2")<>""thencar1=replace(trim(request("car1")),"'...
<%
if request("car1")<>"" or request("car2")<>"" then
car1=replace(trim(request("car1")),"'","")
car2=replace(trim(Request("car2")),"'","")
set rs=server.createobject("adodb.recordset")
sql="select * from car where carid='"&car1&"'and carpws='"&car2&"'"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write"<script>alert('该充值卡不存在!');history.back();</Script>"
response.end
else
paymoney=rs("paymoney")
dayer=rs("day")
oklook=rs("oklook")
set rs1=server.createobject("adodb.recordset")
sql1="select * from user where id='"&request("username")"'")
rs1.open sql1,conn,3,3
set rs2=server.CreateObject ("adodb.recordset")
sql2="select * from car where carid='"&request("car1")"'"
rs2.open sql2,conn,1,3
if rs1.eof and rs1.bof then
response.write"<script>alert('该充值帐号不存在!');history.back();</Script>"
response.end
else
if rs2("zhuangtai") <> "尚未使用" then
response.write"<script>alert('该充值帐号已经使用,请慎重!');history.back();</Script>"
response.end
else
'----变成享受付费会员
rs1("d")=0
rs1("hb")=1
rs1("b")=1
zt=request.form("username")
rs2("zhuangtai")=zt
rs1("begindate")=date()
if rs1("enddate")-date()<1 then
rs1("enddate")=date() + dayer
else
rs1("enddate")=rs1("enddate")+dayer
end if
end if
end if
rs2.update
rs1.update
end if
set rs=nothing
set rs1=nothing
set rs2=nothing
%>
ADODB.Recordset 错误 '800a0cc1' 展开
if request("car1")<>"" or request("car2")<>"" then
car1=replace(trim(request("car1")),"'","")
car2=replace(trim(Request("car2")),"'","")
set rs=server.createobject("adodb.recordset")
sql="select * from car where carid='"&car1&"'and carpws='"&car2&"'"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write"<script>alert('该充值卡不存在!');history.back();</Script>"
response.end
else
paymoney=rs("paymoney")
dayer=rs("day")
oklook=rs("oklook")
set rs1=server.createobject("adodb.recordset")
sql1="select * from user where id='"&request("username")"'")
rs1.open sql1,conn,3,3
set rs2=server.CreateObject ("adodb.recordset")
sql2="select * from car where carid='"&request("car1")"'"
rs2.open sql2,conn,1,3
if rs1.eof and rs1.bof then
response.write"<script>alert('该充值帐号不存在!');history.back();</Script>"
response.end
else
if rs2("zhuangtai") <> "尚未使用" then
response.write"<script>alert('该充值帐号已经使用,请慎重!');history.back();</Script>"
response.end
else
'----变成享受付费会员
rs1("d")=0
rs1("hb")=1
rs1("b")=1
zt=request.form("username")
rs2("zhuangtai")=zt
rs1("begindate")=date()
if rs1("enddate")-date()<1 then
rs1("enddate")=date() + dayer
else
rs1("enddate")=rs1("enddate")+dayer
end if
end if
end if
rs2.update
rs1.update
end if
set rs=nothing
set rs1=nothing
set rs2=nothing
%>
ADODB.Recordset 错误 '800a0cc1' 展开
1个回答
展开全部
一、
sql1="select * from user where id='"&request("username")"'")
改为
sql1="select * from user where id='" & request("username") & "'"
二、
sql2="select * from car where carid='"&request("car1")"'"
改为
sql2="select * from car where carid='" & request("car1") & "'"
sql1="select * from user where id='"&request("username")"'")
改为
sql1="select * from user where id='" & request("username") & "'"
二、
sql2="select * from car where carid='"&request("car1")"'"
改为
sql2="select * from car where carid='" & request("car1") & "'"
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询