批量删除问题还没能搞定呀??再投资请高手!!

hezhan 2004-03-04 04:02:24
prod_edit.asp文件代码如下:
<!--#include file="../common/conn.asp"-->
<%
maxperpage=10
page=request("page")
if not isempty(page) then
if not IsNumeric(page) then
currentPage=1
else
currentPage=cint(page)
end if
else
currentPage=1
end if
keyword=request("keyword")
condition="select * from ProdInfo"
if keyword <> "" then
condition=condition&" where prin_name like '%"&keyword&"%'"
end if
condition=condition&" order by prin_addtime desc"
'response.write condition
set rs=server.createobject("adodb.recordset")
rs.open condition,objConn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改/删除产品</title>
<link rel="stylesheet" href="admin.css" type="text/css">
<link href="../style.css" rel="stylesheet" type="text/css">
<STYLE>
BODY {
scrollbar-face-color : #96A2AD;
scrollbar-shadow-color : #96A2AD;
scrollbar-highlight-color : #96A2AD;
scrollbar-3dlight-color : #96A2AD;
scrollbar-darkshadow-color : #96A2AD;
scrollbar-track-color : #CCCCCC;
scrollbar-arrow-color : #FFFFFF;
}
</STYLE>
<script language="javascript">
function chkDel(id,keyword){
if(confirm("确定要删除吗?")){
window.location="prod_del.asp?id="+id;
}else{
return;
}
}
</script>
</head>

<body leftmargin="0" topmargin="0">
<table width="520" cellspacing="1" cellpadding="3" align=center class="tableBorder">
<form name="form_search" method="post" action="prod_edit.asp">
<tr>
<th height="25" class="tableHeaderText">修改/删除产品</th>
</tr>
<tr>
<td height="25" align="center" class="forumrow">产品名称关键字:
<input type="text" name="keyword"> <input type="submit" name="Submit2" value="查找">
</td>
</tr>
</form>
</table><br>
<% if rs.eof or rs.bof then %>
<table width="520" cellspacing="1" cellpadding="3" align=center class="tableBorder">
<tr height=25>
<td align="center" class="forumrow">没有符合条件的记录</td>
</tr>
</table>
<% else
dim totalPut
totalPut=rs.recordcount
if currentPage<1 then
currentPage=1
end if
if (currentPage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentPage= totalPut \ MaxPerPage
else
currentPage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"prod_edit.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
showContent
showpage totalput,MaxPerPage,"prod_edit.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"prod_edit.asp"
end if
end if
rs.close
end if
%>
<%
sub showContent
'显示企业信息内容的过程
response.write"<table width=""520"" cellspacing=1 cellpadding=3 align=center class=tableBorder>"
response.write"<tr height=25>"
response.write"<th align=center width=40 class=ableHeaderText>编号</th>"
response.write"<th align=center width=190 class=ableHeaderText>产品名称</th>"
response.write"<th align=center width=190 class=ableHeaderText>所属类别</th>"
response.write"<th align=center width=100 class=ableHeaderText>操作</th>"
response.write"</tr>"
response.write"<form name=form1 method=post action=prod_edit_save.asp>"
do while not rs.eof
i = i+1
if bg="" or bg="#ffffff" then
bg="#f0f0f0"
else
bg="#ffffff"
end if
response.write"<tr bgcolor="&bg&" height=20 onmouseover=""this.style.backgroundColor='#cccccc'"" onmouseout=""this.style.backgroundColor='"&bg&"'"">"
response.write"<td align=center class=forumrow>"
response.write"<input type=checkbox name=selAnnounce value="&rs("prin_id")&">"&i&"</td>"
response.write"<td class=forumrow><a href=../new.asp target=_blank>"&rs("prin_name")&"</a></td>"

sql2="select prca_name from ProdCategory where prca_id="&rs("prin_prca_id")
'set rs2=server.createobject("adodb.recordset")
set rs2=objConn.execute(sql2)
response.write"<td align=center width=480 class=forumrow>"
prca_name=rs2("prca_name")
if instr(prca_name,"|")>0 then
prca_name_arr=split(prca_name,"|")
prca_name=prca_name_arr(ubound(prca_name_arr))
end if
response.write prca_name&"</td>"
set rs2=nothing

response.write"<td align=center class=forumrow>"
response.write"<a href=prod_mod.asp?id="&rs("prin_id")&"&keyword="&keyword&"&page="¤tPage&">修改</a>"
response.write" | "
response.write"<a href=""javascript:chkDel("&rs("prin_id")&")"">删除</a>"
response.write"</td>"
response.write"</tr>"
if i>=MaxPerPage then exit do
rs.movenext
loop
response.write"<input type=hidden name=pageToModify value="¤tPage&">"
response.write"<tr height=20>"
response.write"<td colspan=8 align=center height=40 class=forumrow>"
response.write"<input type=submit name=button_value value=删除全部所选记录 onclick=""Check();"">"
response.write"</td>"
response.write"</form>"
response.write"</tr>"
response.write"</table>"
end sub
%>
<%
''显示分页的函数
function showpage(totalnumber,maxperpage,filename)
response.write "<table border=0 align=center><tr><td>"
dim n,page
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<center><form method=Post action="&filename&">"
'response.write "<font color='red'>"&classname&"</font>"
if currentPage<2 then
response.write "共"&totalnumber&"个 首页 上一页 "
else
response.write "共"&totalnumber&"个 <a href="&filename&"?page=1&keyword="&keyword&">首页</a> "
response.write "<a href="&filename&"?page="¤tPage-1&"&keyword="&keyword&">上一页</a> "
end if
if n-currentPage<1 then
response.write "下一页 尾页"
else
response.write "<a href="&filename&"?page="&(currentPage+1)&"&keyword="&keyword&">"
response.write "下一页</a> <a href="&filename&"?page="&n&"&keyword="&keyword&">尾页</a>"
end if
response.write " 页次:<strong><font color=red>"¤tPage&"</font>/"&n&"</strong>页 "
response.write " <b>"&maxperpage&"</b>个/页 "
response.write"转:<select name='page' size='1' onchange='javascript:submit()'>"
for i = 1 to n
response.write"<option value="&i
if cint(currentPage)=cint(i) then
response.write" selected"
end if
response.write">第"&i&"页</option>"
next
response.write"</select>"
response.write"<input type=""hidden"" name=""keyword"" value="""&keyword&""">"
response.write"</form>"
response.write"</center>"
response.write"</td></tr></table>"
end function
%>

prod_edit_save.asp文件代码如下:

刚才提问的链接有,请点击查看:http://expert.csdn.net/Expert/topic/2805/2805481.xml?temp=.3335535

我改为:idArr=split(idlist," ,")还是一样出现如下错误信息


错误信息如下:
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Microsoft JET Database Engine 错误 '80040e10'
至少一个参数没有被指定值。
/manager2/prod_edit_save.asp,行39
所需的文件都展示给大家看了,希望大家能帮我一下忙!高分给!
...全文
13 点赞 收藏 5
写回复
5 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
相关推荐
发帖
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
帖子事件
创建了帖子
2004-03-04 04:02
社区公告
暂无公告