坚果g1pro参数:asp问题 急

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/29 11:05:27
错误类型:
Microsoft JET Database Engine (0x80040E14)
语法错误 (操作符丢失) 在查询表达式 'cj_xuehao=' 中。
/cyx/my/admin/grcjcx.asp, 第 5 行

<!--#include file=conn.asp-->
<% xuehao=request("xuehao")
set rs=server.createobject("adodb.recordset")
sql="select * from cj where cj_xuehao="&xuehao
rs.open sql,conn,1,1

%>
<form name="mian" method="post" action="grcj.asp?cj_id=<%=rs("cj_id")%>" >
<b>学号:</b> <select name="xuehao">
<% do while not rs.eof%>
<option value="<%=rs("cj_id")%>"><%=rs("cj_xuehao")%></option>
<%rs.movenext
loop
%>
</select>
<input type="submit" name="b" value="查询">
<p> </p>
</form>
错误类型:
ADODB.Field (0x80020009)
改了之后就这样了
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/cyx/my/admin/grcjcx.asp

sql="select * from cj where cj_xuehao="&xuehao
改成这个
sql="select * from cj where cj_xuehao='"&xuehao&"'"