.asp的问题,我做了调试不知道哪里出错,请朋友们指教,谢谢!

来源:百度知道 编辑:UC知道 时间:2024/06/20 12:30:59
错误类型:
Microsoft JET Database Engine (0x80040E14)
语法错误 (操作符丢失) 在查询表达式 'p_id =' 中。

上面是错误提示,我把这行程序发给大家看看,帮我看看是哪里出错了。先谢谢了。
<%set rqs=conn.execute("select * from p_class where p_id = "& classType &"")%>
<b><%=rqs("p_type")%></b>:<%=rqs("p_bz")%>
<%
谢谢刚才回答的三位朋友,要怎样调一下呢?

classType没值吧。

<%set rqs=conn.execute("select * from p_class where p_id = "& classType &"")%>
<b><%=rqs("p_type")%></b>:<%=rqs("p_bz")%>
<%
没值,你的在前面加上一句
clastype=request("classtype")
这句的意思就是,从他的前一页,获取值

变量classType没有有效的值导致SQL语句出错,变成select * from p_class where p_id =;这句当然错了

" & class Type & "