谢谢了,学了不少.
又一问题来麻烦大家了.不知道错在哪?说是那段错误,可检查了,没看出来哪错.
<!--#include file="../conn/conn.asp"-->
<%
set rs=createobject("adodb.recordset")
sql="select 类别ID,单位数量,单价,库存量,订购量 from chanpin"
rs.open sql,conn,1,1
pagecounter=15
%>
<html>
<head>
<title>删除表记录</title>
</head>
<body>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="2" bgcolor="#ffcc66">
<form name="form1" method="post" action="delete.asp">
<tr>
<td align="center" bgcolor="#ffffff"><span class="style3">产品名称</span></td>
<td align="center" bgcolor="#ffffff"><span class="style3">单位数量</span></td>
<td align="center" bgcolor="#ffffff"><span class="style3">单价</span></td>
<td align="center" bgcolor="#ffffff"><span class="style3">库存量</span></td>
<td align="center" bgcolor="#ffffff"><span class="style3">订购量</span></td>
<td align="center" bgcolor="#ffffff"><span class="style3">修改信息</span></td>
<td align="center" bgcolor="#ffffff"><input type="submit" name="Submit" value="删除"></td>
</tr>
<%
pageno=request.QueryString("pageno")
rs.pagesize=pagecounter
page=rs.pagecount
if pageno="" or pageno<1 then
pageno=1
end if
if rs.eof or rs.bof then
response.write"<font color=""ff0000"">此数据表没有记录!</font>"
else
rs.absolutepage=Cint(pageno)
position=rs.PageSize*pageno
pagebegin=position-rs.PageSize+1
if position<rs.RecordCount then
pagend=postion
else
pagend=rs.recordcount
end if
do while not.eof and c<=rs.pagesize
e=e+1
%>
<tr>
<td align="center" bgcolor="#FFFFFF" class="font2"><%=rs("产品名称")%></td>
<td align="center" bgcolor="#FFFFFF" class="font2"><%=rs("单位数量")%></td>
<td align="center" bgcolor="#FFFFFF" class="font2"><%=rs("单价")%></td>
<td align="center" bgcolor="#FFFFFF" class="font2"><%=rs("库存量")%></td>
<td align="center" bgcolor="#FFFFFF" class="font2"><%=rs("订购量")%></td>
<td align="center" bgcolor="#FFFFFF" class="font2">
<a href="modinfo.asp?MID=<%=rs("ID")%>">修改</a></td>
<td align="center" bgcolor="#FFFFFF" class="font2"><%ID=rs("ID") response.Write"<input type=""checkbox"" name=""checkbox"" value="""&ID&""""%></td>
</tr>
<%
rs.movenext
loop
pagecounter=pagecounter-1
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<tr>
<td colspan="7" align="center" bgcolor="#FFFFFF" class="font2">
页次:[<%=Cint(pageno)%>/<%=page%>]
记录:[<%=Cint(pagebegin)%>至<%=pagend%>条]
<%if Cint(pageno)>1 then%>
<a href="?pageno=<%=(pageno-1)%>">[上一页]</a>
<%end if%>
<%if page>1 and Cint(pageno)<Cint(page) then%>
<a href="?pageno=<%=(pageno+1)%>">[下一页]</a>
<%end if%>
</td>
</tr>
</form>
</table>
</body>
</html>
错误如下:
错误类型:
Microsoft VBScript 编译器错误 (0x800A0401)
语句未结束
/second/modanddel.asp, line 53, column 12
ID=rs("ID") response.Write"<input type=""checkbox"" name=""checkbox"" value="""&ID&""""
-----------^
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
网页:
GET /second/modanddel.asp