<!-- #include file="conn.asp" -->
<body bgcolor="">
<SCRIPT LANGUAGE="vbScript">
<!--
Sub delete(bookID)
If MsgBox("您要删除该图书?",vbyesno,"警告!!!")=vbyes Then
f1.hid_bookID.value=bookID
f1.action="as_delete_book.asp"
f1.submit
End If
End sub
//-->
</SCRIPT>
<FORM METHOD=POST ACTION="" name="f1">
<style>
table tr{text-align:center}
</style>
<INPUT TYPE="hidden" name="hid_bookID">
<TABLE border="1" bordercolor="#0000000">
<TR>
<TD width="190" height="35">图书名</TD>
<TD width="100">作者</TD>
<TD width="130">出版社</TD>
<TD width="110">类别</TD>
<TD width="90">状态</TD>
<TD width="80">价格</TD>
<TD width="80">操作</TD>
</TR>
<%
Dim str,State,str1,bookID
bookID=request("hid_bookID")
If bookID<>"" Then
str1="delete from book where book_id='" & bookID & "'"
'response.redirect str1
conn.execute(str1)
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
str="select * from book"
Set rec=conn.execute(str)
Do While Not rec.eof
If rec(5)=0 Then
State="<FONT COLOR=""#FF0066"">库存</FONT>"
Else
State="<FONT COLOR=""#FFCC66"">借出</FONT>"
End if
%>
<TR>
<TD height="35"><%=rec(1)%></TD>
<TD><%=rec(2)%></TD>
<TD><%=rec(3)%></TD>
<TD><%=rec(4)%></TD>
<TD><%=State%></TD>
<TD><%=rec(6)%>元</TD>
<%
Dim str2
str2="select Book_State from book where book_id='" & rec(0) & "'"
Set recmy=conn.execute(str2)
If recmy(0)=0 then
%>
<td><A href="#" onclick="delete(<%=rec(0)%>)">删除</a></td>
<%
Else
%>
<td><FONT COLOR="red">不可操作</FONT></a></td>
</TR>
<%
rec.movenext
Loop
%>
</TABLE>
</body>
</FORM>
怎么才可以实现这个程序
要使从数据库里面取出来的值 如果是0的话就可以进行删除 如果是1的话不可以进行操作
上面的代码加了之后回出现
'loop' 语句缺少 'do'
/AS_BOOK/ASP_file/as_delete_book.asp,行69
Loop
这样的错误