代码出错
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!--#include file="inc/strchk.asp"-->
<%
ttt=rtrim(ltrim(request("ttt")))
search=request("search")
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查找结果</title>
</head>
<body>
<% if search="按标题查找" then
set rst=server.createobject("adodb.recordset")
sqlt="select * from mybook where title like '%"&strchk(ttt)&"%' order by time desc"
rst.open sqlt,conn,1,1
%>
<table width="605" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="605" height="63" align="center" valign="top"> <table width="99%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="500" align="center">共搜索到<%=rst("recordcount")%>篇文章标题符合,关键词:<%=ttt%> </td>
</tr>
</table></br>
<% end if
if search="按姓名查找" then
set rst=server.createobject("adodb.recordset")
sqlt="select * from mybook where name like '%"&strchk(ttt ) &"%' order by time desc"
rst.open sqlt,conn,1,1
%>
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="494" align="center">共搜索到<%=rst("recordcount")%>篇文章姓名符合,关键词:<%=ttt%></td>
</tr>
<% end if%>
</table></td>
</tr>
<tr>
<td height="336" align="center" valign="top">
<%if rst.eof and rst.bof then%>
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="24" align="center">没有找到任何结果<a href="#" onClick="window.close()">关闭</a></td>
</tr>
</table></br>
<%else%>
<table width="511" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="511" height="168"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="132"> </td>
</tr>
</table>
<%end if %>
</body>
</html>
请问哪里错了,他提示<%if rst.eof and rst.bof then%> 无法运行。
[此贴子已经被作者于2005-6-11 9:14:14编辑过]