ASP连接数据库时,无法显示网页!!
制作B/S模式的图书管理系统其中一个 库存图书查询的ASP文件, 代码是:
%>
<html>
<head>
<title>库存图书查询列表</title>
</head>
<body bgcolor="#FFFFCC" text="#000000" link="#3366CC" vlink="#666666" alink="#990000">
<br><br>
<h1 align="center">
<font color="#800080" size="+6" face="华文行楷">
<b>库 存 图 书 查 询 列 表</b></font>
<%
set cn=server.CreateObject("ADODB.Connection")
cn.open "Dsn=tsgl;UID=sa;PWD="
if request.Form("tsgjzlb")="图书编号"then
Set rs=cn.Execute("select * from tsbm where tsbh like '%"&request.Form("tsgjz")"%'")
elseif request.Form("tsgjzlb")="图书名称"then
Set rs=cn.Execute("select * from tsbm where tsmc like '%"&request.Form("tsgjz")"%'")
elseif request.Form("tsgjzlb")="图书类别"then
Set rs=cn.Execute("select * from tsbm where tslb like '%"&request.Form("tsgjz")"%'")
elseif request.Form("tsgjzlb")="作者"then
Set rs=cn.Execute("select * from tsbm where zzxm like '%"&request.Form("tsgjz")"%'")
else
Set rs=cn.Execute("select * from tsbm where cbs like '%"&request.Form("tsgjz")"%'")
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"<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("tslb")&"</td>"
response.Write"<td>"&rs("zzxm")&"</td>"
response.Write"<td>"&rs("cbs")&"</td>"
response.Write"<td>"&rs("cbrq")&"</td>"
response.Write"<td>"&rs("dj")&"</td>"
response.Write"<td>"&rs("bz")&"</td>"
response.Write"</tr>"
rs.movenext
loop
response.Write"</table>"
end if
%>
网页中提示 红的代码错误!!!
急 ! 急!!!
谢谢~~~