主题:  一个列出字段的程序,出错在哪里?

计算器

职务:普通成员
等级:1
金币:0.0
发贴:74
#12004/1/4 18:20:27
<body>
<%
sql="select * from book"
set rs=db.execute(sql)
%>
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td height="29"> <div align="center">ID</div></td>
<td><div align="center">书名</div></td>
<td><div align="center">出版社</div></td>
<td><div align="center">日期</div></td>
<td><div align="center">价格</div></td>
</tr>
<%
do while not rs.eof
%>
<tr>
<td height="31"><div align="center"><%=rs("id")%></div></td>
<td><div align="center"><%=rs("name")%></div></td>
<td><div align="center"><%=rs("publishing")%></div></td>
<td><div align="center"><%=rs("pubdate")%></div></td>
<td><div align="center"><%=rs("price")%></div></td>
</tr>
<%
rs.movenext
loop
%>
</table>
<p align="center">共有个<%=rs.fields.count%>字段</p>
<p align="center">分别是
<%
for i=0 to rs.fields.count-1
if i<>rs.fields.count-1 then
deli=","
else
deli="."
response.write rs.fields(i).name & deli
next
%>
</p>
</body>