不能显示
<!--#include file="conn.asp"--><%
set rs2=server.createobject("adodb.recordset")
sql="select * from admin_xx where sjr='"&nqr&"'"
rs2.open sql,conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>未读邮件</title>
<link rel="stylesheet" href="style.css">
</head>
<body topmargin="0">
<!--#include file="top.asp"-->
<table width="100%" border="1">
<tr>
<td width="20%" height="219"><table width="100%" border="1" height="100%">
<tr>
<td height="80%"><table width="100%" border="1" height="100%">
<tr>
<td>未读邮件</td>
</tr>
<tr>
<td>已读邮件</td>
</tr>
<tr>
<td>已发邮件</td>
</tr>
<tr>
<td>写信</td>
</tr>
</table></td>
</tr>
<tr>
<td height="20%"> </td>
</tr>
</table></td>
<td width="80%"><table width="100%" border="1">
<tr>
<td><table width="100%" border="1">
<tr>
<td align="center" width="10%"> </td>
<td align="left" width="40%">标题</td>
<td align="center" width="20%">发件人</td>
<td align="center" width="20%">日期</td>
<td align="center" width="10%"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="176">
<%
if Not(rs2.bof and rs2.eof) then'判别数据表中是否为空记录
NumRecord=rs2.recordcount
rs2.pagesize=10
NumPage=rs2.Pagecount
if request("page")=empty then
NoncePage=1
else
if Cint(request("page"))<1 then
NoncePage=1
else
NoncePage=request("page")
end if
if Cint(Trim(request("page")))>Cint(NumPage) then NoncePage=NumPage
end if
else
NumRecord=0
NumPage=0
NoncePage=0
end if
%>
<table width="100%" border="1">
<%if Not(rs2.bof and rs2.eof) then
rs2.move (Cint(NoncePage)-1)*10,1
for i=1 to rs2.pagesize
%>
<tr>
<td align="center" width="10%"><img src="image/wei.jpg" width="25" height="20"></td>
<td align="center" width="40%"><%=rs2("bt")%></td>
<td align="center" width="20%"><%=rs2("fjr")%></td>
<td align="center" width="20%"><%=rs2("date")%></td>
<td align="center" width="10%">删除</td>
<% rs2.movenext
if rs2.eof then exit for
next
else
response.write "<tr><td colspan=7><marquee scrolldelay=120 behavior=alternate>没有找到任何邮件!!!</marquee></td></tr>"
end if
rs2.close
set rs2=nothing
%>
</tr>
</table>
<table width="100%" border="0" align="center">
<tr>
<td height="17">
<div align="right">
<input type="hidden" name="page" value="<%=NoncePage%>">
<%
if NoncePage>1 then
response.write "|<a href=yx.asp?page=1>首 页</a>| |<a href=yx.asp?page="&NoncePage-1&">上一页</a>| "
else
response.write "|首 页| |上一页| "
end if
if Cint(Trim(NoncePage))<Cint(Trim(NumPage)) then
response.write "|<a href=yx.asp?page="&NoncePage+1&">下一页</a>| |<a href=yx.asp?page="&NumPage&">尾 页</a>|"
else
response.write "|下一页| |尾 页|"
end if
%>
页次:<font color="#0033CC"><%=NoncePage%></font>/<font color="#0033CC"><%=NumPage%></font>
共<font color="#FF0000"><%=NumRecord%></font>封 </div></td>
</table>
</td>
</tr>
</table></td>
</tr>
</table>
我在admin_xx表中查找“sjr”字段值等于“nqr”的记录,admin_xx中存在这样的记录,但ASP页面中却显示“不存在记录”,是不是我的sql语句写的不对啊?