ASP代码问题,各位帮忙看下啊!
来源:百度知道 编辑:UC知道 时间:2024/05/25 03:16:00
<%
MM_flag="MM_insert"
If (CStr(Request(MM_flag)) <> "") Then
roomname=Request.Form("roomname")
num=Request.Form("num")
set rs=server.CreateObject("adodb.recordset")
sql="select * from room where roomname='"&roomname&"'"
rs.open sql,conn,3,1
rnum=conn.execute ("select rnum from room where roomname='"&roomname&"'" )
if cint(num) > cint(rnum) then
response.Write "<script>alert('房间预定已满!');history.go(-1);</script>"
response.end
end if
end if
%>
Microsoft VBScript 运行时错误 错误 '800a01c2'
错误的参数个数或无效的参数属性值
/TMPli1wbye81i.asp,行54
行54就是if cint(num) > cint(rnum) then
MM_flag="MM_insert"
If (CStr(Request(MM_flag)) <> "") Then
roomname=Request.Form("roomname")
num=Request.Form("num")
set rs=server.CreateObject("adodb.recordset")
sql="select * from room where roomname='"&roomname&"'"
rs.open sql,conn,3,1
rnum=conn.execute ("select rnum from room where roomname='"&roomname&"'" )
if cint(num) > cint(rnum) then
response.Write "<script>alert('房间预定已满!');history.go(-1);</script>"
response.end
end if
end if
%>
Microsoft VBScript 运行时错误 错误 '800a01c2'
错误的参数个数或无效的参数属性值
/TMPli1wbye81i.asp,行54
行54就是if cint(num) > cint(rnum) then
错误的参数个数或无效的参数属性值
这个有可能是数据库处于打开状态
if cint(num) > cint(rnum) then
可能是num没有取到值呢
sql="select * from room where roomname='"&roomname&"'"
上面这句话错了。
一定是SQL语句有问题。
What it make that was already fale.
SQL语句有问题
加一个中断(response.end())看看有没有取到值