想在表ry中删除一条记录,但是运行到第83行提示说,操作符丢失(如图所示),83句的意思是查询符合条件name='"&request("name")&"'and proid="&s_id的记录,其中name是文本字段,proid是数字型字段,我用各种方法试了之后觉得应该是name字段没有被赋值,请各位大虾 帮忙
<!--#include file="conn.asp"-->
<%
call admintop()
if session("admin_name")="" then
adminflag()
else
dim action, s_id,s_paixu,se_id
s_id=cint(request("s_id"))
action=request("action")
se_id=cint(request("se_id"))
name1=request("name")
select case action
'----------------------------------------
case "add"
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from lvli", conn, 1, 3
rs.AddNew
rs("proid")=request.form("s_id")
rs("qytime")=trim(request("qytime"))
rs("fsdanwei")=trim(request("fsdanwei"))
rs("fsren")=trim(request("fsren"))
rs("jsren")=trim(request("jsren"))
rs.Update
rs.Close
set rs=nothing
'以下几行代码为向ry表添加扣分人员名单
fsdanwei1=trim(request("fsdanwei"))
set rs1=server.CreateObject("adodb.recordset")
rs1.Open "select * from ry where name='"&fsdanwei1&"'and ryid="&s_id, conn, 1, 3
if rs1.EOF and rs1.BOF then
rs1.AddNew
rs1("ryid")=request.form("s_id")
'rs1("qytime")=trim(request("qytime"))
rs1("name")=trim(request("fsdanwei"))
'rs1("fsren")=trim(request("fsren"))
'rs1("jsren")=trim(request("jsren"))
rs1.Update
end if
rs1.Close
set rs1=nothing
set rsm=server.CreateObject("adodb.recordset")
rsm.Open "select * from admin_product where p_id="&s_id, conn, 1, 3
rsm.Update
rsm.Close
set rsm=nothing
response.Redirect url&"admin_addcv.asp?s_id="&s_id
response.end
case "add1"
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from cv", conn, 1, 3
rs.AddNew
rs("productid")=request.form("se_id")
rs("proid")=request.form("s_id")
rs("sxdanwei")=trim(request("sxdanwei"))
rs("sxtime")=trim(request("sxtime"))
rs("sxren")=trim(request("sxren"))
rs("reciever")=trim(request("reciever"))
rs("trouble")=trim(request("trouble"))
rs("cause")=trim(request("cause"))
rs("description")=trim(request("description"))
rs.Update
rs.Close
set rs=nothing
response.Redirect url&"admin_addcv.asp?s_id="&s_id
response.end
case "del"
s_id=cint(request("s_id"))
name1=trim(request("name"))
fsdanwei1=trim(request("name"))
set rs=server.CreateObject("adodb.recordset")
conn.execute "delete from lvli where id="&se_id
'以下几行代码为向ry表删除扣分人员名单
set rs8=server.CreateObject("adodb.recordset")
rs8.Open "select * from lvli where name='"&request("name")&"'and proid="&s_id,conn,1,1 '第83行
'rss.Open "select * from lvli where proid="& s_id &" and name="&name1, conn, 1,1
if rs8.EOF and rs8.BOF then
conn.execute "delete from ry where name="&request("name")
end if
rs8.Close
set rs8=nothing
if request("page")<>"" then
response.Redirect "admin_product.asp?gjc="&gjc&"&s_name="&s_name&"&page="&request("page")&""
else
response.Redirect "admin_product.asp?gjc="&gjc&"&s_name="&s_name&""
end if
response.end
end select
%>
<SCRIPT LANGUAGE=javascript>
var tt='start';
var ii='start';
function turnit(ss,bb) {
if (ss.style.display=="none") {
if(tt!='start') tt.style.display="none";
if(ii!='start') ii.src="";
ss.style.display="";
tt=ss;
ii=bb;
bb.src="";
}
else {
ss.style.display="none";
bb.src="";
}
}
</SCRIPT>
<SCRIPT LANGUAGE=javascript>
var pp='start';
var qq='start';
function turnit1(oo,uu) {
if (oo.style.display=="none") {
if(pp!='start') pp.style.display="none";
if(qq!='start') qq.src="";
oo.style.display="";
pp=oo;
qq=uu;
uu.src="";
}
else {
oo.style.display="none";
uu.src="";
}
}
</SCRIPT>
<SCRIPT LANGUAGE=javascript>
var yy='start';
var xx='start';
function turnit2(kk,hh) {
if (kk.style.display=="none") {
if(yy!='start') yy.style.display="none";
if(xx!='start') xx.src="";
kk.style.display="";
yy=kk;
xx=hh;
hh.src="";
}
else {
kk.style.display="none";
hh.src="";
}
}
</SCRIPT>
<SCRIPT src="js/birthday.js"></SCRIPT>
<script src="js/Popup.js"></script>
<table border="0" cellspacing="1" cellpadding="0" height="0" align=center width="98%" bgcolor="#183789">
<tr>
<td>
<table border="0" cellspacing="1" cellpadding="4" bgcolor="#FFFFFF" align="center" width="100%">
<tr>
<td height=15 align=center colspan=6 class=classtop>科(队)室信息</td>
</tr>
<%set rs=server.CreateObject("adodb.recordset")
rs.open "select * from admin_product where p_id=" &s_id, conn, 1, 3
dim i
i=rs.recordcount%>
<tr class="classtd">
<td height="25" align="center" class="classtd" width="11%">科(队)室:</td>
<td width="19%"><%=rs("p_name")%></td>
<td height="25" align="center" class="classtd" width="12%">扣分总数:</td>
<td width="19%"><%=rs("p_xinghao")%></td>
<td height="25" align="center" class="classtd" width="9%">部门:</td>
<td width="24%"><%=rs("p_sort")%></td>
</tr>
<%rs.close
set rs=nothing %></table>
<table border="0" cellspacing="1" cellpadding="4" bgcolor="#FFFFFF" align="center" width="100%">
<tr>
<td height=15 align=center colspan=17 class=classtop>扣分人员详细情况</td>
</tr></table>
<table border="0" cellspacing="1" cellpadding="0" height="0" align=center width="100%" bgcolor="#FFFFFF">
<tr class="classtd">
<td width="20%" align="center" colspan="1">扣分时间</td>
<td width="20%" align="center">姓名</td>
<td width="52%" align="center">扣分理由</td>
<td width="10%" align="center">扣分</td>
<td height="15" align="center" width="15%">操作</td>
</tr>
<% dim n
n=1
set rs2=server.CreateObject("adodb.recordset")
rs2.Open "select * from lvli where proid="&s_id ,conn,1,1
if rs2.EOF and rs2.BOF then
response.Write "<div align=center><font color=red>目前没有信息</font></center>"
else
do while not rs2.EOF
%>
<tr class="classtd">
<td align="center"><%=rs2("qytime")%><%se_id=rs2("id")%></td>
<td align="center"><%=rs2("fsdanwei")%></td>
<td align="center"><%=rs2("fsren")%></td>
<td align="center"><%=rs2("jsren")%></td>
<td class="classtd" width="15%">
<div align="center">
<a href="admin_addcv.asp?action=del&se_id=<%=rs2("id")%>&s_id=<%=rs2("proid")%>&name='<%=rs2("fsdanwei")%>'">删除</a>
<input type="button" name="Submit2" value="删 除" onclick="{if(confirm('确认删除 <%=rs2("fsdanwei")%> 么?')){location.href='admin_addcv.asp?action=del&name=<%=rs2("fsdanwei")%>&se_id=<%=rs2("id")%>';}return true;}">
</div>
</td>
</tr>
<%n=n+1
rs2.movenext
loop
rs2.close
set rs2=nothing
end if %></table>
<table border="0" cellspacing="1" cellpadding="4" bgcolor="#FFFFFF" align="center" width="100%">
<tr>
<td height=15 align=center colspan=17 class=classtop>添加扣分人员信息</td>
</tr></table>
<table border="0" cellspacing="1" cellpadding="0" height="0" align=center width="100%" bgcolor="#FFFFFF">
<tr class="classtd">
<form name="form1" method="post" action="admin_addcv.asp?action=add">
<td height="25" align="center" class="classtd">扣分时间:</td><td width="30%"><input type=text name="qytime" id="date1" size="10"><a href=# title="选择日期" onClick="fPopUpDlg('js/calendar.htm', document.form1.date1, 'winpop', 177, 210);return false">
<img src="images/datetime.GIF" width="16" height="16" border=0 align="absmiddle"></a></td>
<td height="25" align="center" class="classtd">姓名:</td>
<td>
<input type=text name="fsdanwei" size="49"></td>
<tr class="classtd"><td height="25" align="center" class="classtd">扣分理由:</td><td>
<input type=text name="fsren" size="49"></td>
<td height="25" align="center" class="classtd">扣分:</td><td><input type=text name="jsren" size="10"></td>
<td></td>
</tr>
<tr class="classtd">
<td class="classtd" align="center" colspan="2">
<input type="submit" name="Submit" value="添加">
<input name="s_id" type="hidden" value="<%=s_id%>">
<input name="se_id" type="hidden" value="<%=se_id%>">
</td>
</form>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" cellspacing="1" cellpadding="4" bgcolor="#FFFFFF" align="center" width="98%">
<tr>
<td height=15 align=center colspan=17 class=classtop></td>
</tr></table>
<%end if%>