B/S图书管理系统 rs=cn.execute select问题
图书管理系统 三个表 tsbm,dzmc,tsjy 代码:<%
Set cn=Server.CreateObject("ADODB.Connection")
cn.open "provider=sqloledb;server=(local);database=abc;uid=abc;pwd=abc;"
if request.Form("cxgjzlb")="图书编号"then
Set rs=cn.Execute("select tsbm.tsbh,tsmc,dzmc.jszh,dzxm,jcrq from tsbm,dzmc,tsjy where tsbm.tsbh=tsjy.tsbh and dzmc.jszh=tsjy.jszh and jcbz='借出' and tsbm.tsbh like '%"&request.Form("cxgjz")&"%'")
elseif request.Form("cxgjzlb")="图书名称"then
Set rs=cn.Execute("select tsbm.tsbh,tsmc,dzmc.jszh,dzxm,jcrq from tsbm,dzmc,tsjy where tsbm.tsbh=tsjy.tsbh and dzmc.jszh=tsjy.jszh and jcbz='借出' and tsmc like '%"&request.Form("cxgjz")&"%'")
elseif request.Form("cxgjzlb")="借书证号"then
Set rs=cn.Execute("select tsbm.tsbh,tsmc,dzmc.jszh,dzxm,jcrq from tsbm,dzmc,tsjy where tsbm.tsbh=tsjy.tsbh and dzmc.jszh=tsjy.jszh and jcbz='借出' and dzmc.jszh like '%"&request.Form("cxgjz")&"%'")
else
Set rs=cn.Execute("select tsbm.tsbh,tsmc,dzmc.jszh,dzxm,jcrq from tsbm,dzmc,tsjy where tsbm.tsbh=tsjy.tsbh and dzmc.jszh=tsjy.jszh and jcbz='借出' and dzxm like '%"&request.Form("cxgjz")&"%'")
end if
if rs.eof then
response.Write"<font size='4' color='#0000ff'>"
response.Write"<center>没有要查询的记录</center>"
response.Write"</font>"
else
response.Write"<table align=center border=1 cellpadding='3' style='font-size:11pt'>"
response.Write"<tr bgcolor=#d8bfd8>"
response.Write"<td nowrap align=center>图书编号</td>"
response.Write"<td nowrap align=center>图书名称</td>"
response.Write"<td nowrap align=center>借书证号</td>"
response.Write"<td nowrap align=center>读者姓名</td>"
response.Write"<td nowrap align=center>借出日期</td>"
response.Write"</tr>"
do while not rs.eof
response.Write"<tr>"
response.Write"<td>"&rs("tsbh")&"</td>"
response.Write"<td>"&rs("tsmc")&"</td>"
response.Write"<td>"&rs("jszh")&"</td>"
response.Write"<td>"&rs("dzxm")&"</td>"
response.Write"<td>"&rs("jcrq")&"</td>"
response.Write"</tr>"
rs.movenext
loop
response.Write"</table>"
end if
%>
运行 时显示 数据库信息
可是在运行 网页:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>借出图书查询</title>
<script language="VBScript" type="text/VBscript" src="jctscxlb.asp"></script>
</head>
<body bgcolor="#FFFFCC" text="#000000" link="#3366CC" vlink="#666666" alink="#990000">
<br><br>
<p align="center">
<font face="华文行楷" size="+6" color="#FF0000">
<b>借 出 图 书 查 询</b></font></br>
<p align="center">
<form method="post" action="jctscxlb.asp">
<font face="宋体" color="#0000FF" size="3">
选择查询关键字类别:
<select size="1" name="jctscxlb">
<option>图书编号</option>
<option>图书名称</option>
<option>借书证号</option>
<option>读者姓名</option>
</select>
<br><br>
请 输 入 查 询 关 键 字:
<input type="text" name="cxgjz" size="9">
<br><br>
<input type="submit" value="查 询" name="B1">
<input type="reset" value="重 选" name="B2">
</font>
</form>
</p>
</body>
</html>
点击查询却 显示无结果!!! 请问什么的情况?