这个ASP程序错在哪里啊?

来源:百度知道 编辑:UC知道 时间:2024/06/06 09:30:15
<%@ language=vbscript%>
<!--#include file="adovbs.inc"-->
<% response.buffer=true %>
<html>
<title>command对象基本用法</title>
<head>
<%
sub rs_display()
set conn=server.createobject("adodb.connection")
conn.open "tushuguanli","zjj","1234"
set cm=server.createobject("adodb.command")
set cm.activeconnection=conn
cm.commandtext="select * from booknet"
cm.commandtype=adcmdtext
cm.commandtext="booknet"
cm.commandtype=adcmdtable
set rs=cm.execute
if rs.eof then
response.write "没有查询到记录!"
exit sub
end if
with response.write"<table border=1 cellspace=0 cellpadding=5>"&_
"<tr height=12><td width=70><b>图书编号</b> </td>"&_
"<td width=300><b>

with response '这里换行
.write"<table border=1 cellspace=0 cellpadding=5>"&_
"<tr height=12><td width=70><b>图书编号</b> </td>"&_
"<td width=300><b>图书编号</b> </td>"&_
"<td width=150><b>作者</b> </td>"&_
"<td width=40><b>价格</b> </td></tr>"&_
do until rs.eof
.write '这里少个. 不要换行
"<tr height=12><td width=70>"& rs("num")& "</td>"&_
"<td width=300>"& rs("bookname")& "</td>"&_
"<td width=150>"& rs("name")& "</td>"&_
"<td width=40>"& rs("price")& "</td></tr>"&_
rs.movenext
loop
.write"</table>"
end with