ASP 0x80020009的问题 麻烦各位大虾

来源:百度知道 编辑:UC知道 时间:2024/07/05 02:58:11
IE上提示如下
-----------------------------
错误类型:
ADODB.Field (0x80020009)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
-----------------------------
用到数据库的代码如下
<!--#include file="conn.asp"-->
<html>
<%
sql="select ac,id,name,gh,clicks,part,address,phone,mobile,duan,xiao,bphone,email,email1 from xz where id="&clng(request("id"))
rs.open sql,conn,1,1
%>
------------------
<tr>
<td height="30" width="100" align="center" bgcolor="#FEFBF4">
<p align="center">姓    名:</td>
<td height="30" width="170">
<%=rs("name")%></td>
<td height="30" width="100" align="center" bgcolor="#FEFBF4"> 工    号:</td>
<td height="30" width="170">

id没有得到值!

id="&clng(request("id")) ,你的ID应该是INT类型吧先变成id="&int(trim(request("id")))
另外你能够保证安全的提交ID么?
即使可以安全的提交,也应该在使用之前先判断数据是否存在
if not rs.eof or rs.bof