ASP问题"菜单/列表"
<%ifrequest("submit")="确认添加"thenproductname=request("productname")productid=request("...
<%
if request("submit")="确认添加" then
productname=request("productname")
productid=request("productid")
bigclass=request("bigclass")
cl=request("cl")
sizes=request("sizes")
if request("salesmoney")="" then
salesmoney="0"
else
salesmoney=request("salesmoney")
end if
shouming=request("shouming")
if productname="" or productid="" or bigclass="" or cl="" then
Response.Write("<script language=""javascript"">alert('产品名称、编号、类别、材料和说明都不能为空!');location='"&myself&"';</script>")
Response.End()
else
CommandText="insert into productinfo(productname,productid,bigclass,cl,sizes,salesmoney,shouming) Values('"&productname&"','"&productid&"','"&bigclass&"','"&cl&"','"&sizes&"','"&salesmoney&"','"&shouming&"')"
Conn.Execute CommandText
response.redirect"upfile.asp"
end if
end if
%>
<html>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="75%" border="0" cellspacing="1" cellpadding="5" bgcolor="#000000">
<form name="form2" method="post" action="">
<tr>
<td bgcolor="#F1f1f1" colspan="2">
<div align="center">产品信息修改</div>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" width="40%" align="center">产品名称:</td>
<td bgcolor="#FFFFFF">
<input type="text" name="productname"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">
<div align="center">产品编号:</div>
</td>
<td bgcolor="#FFFFFF">
<input type="text" name="productid">
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" align="center">产品类别:</td>
<td bgcolor="#FFFFFF">
<select name="bigclass">
<option value="<%=rs("bigclass")%>" selected><%=rs("bigclass")%></option>
<%set rsb=conn.execute("select * from bigclass order by id desc")
if rsb.eof then
response.write""
else
do while not rsb.eof%>
<option value="<%=rsb("bigclass")%>"><%=rsb("bigclass")%></option>
<%rsb.movenext
loop
end if
rsb.close
set rsb=nothing
%>
</select>
</td>
错误类型:
ADODB.Recordset (0x800A0CC1)
在对应所需名称或序数的集合中,未找到项目。
/abc/admin/addproductinfo.asp, 第 64 行
问题好像是出在:<select name="bigclass">
<option value="<%=rs("bigclass")%>" selected><%=rs("bigclass")%></option>
<%set rsb=conn.execute("select * from bigclass order by id desc")
if rsb.eof then
response.write""
else
do while not rsb.eof%>
<option value="<%=rsb("bigclass")%>"><%=rsb("bigclass")%></option>
<%rsb.movenext
loop
end if
rsb.close
set rsb=nothing
%>
</select>
要怎么改啊???? 展开
if request("submit")="确认添加" then
productname=request("productname")
productid=request("productid")
bigclass=request("bigclass")
cl=request("cl")
sizes=request("sizes")
if request("salesmoney")="" then
salesmoney="0"
else
salesmoney=request("salesmoney")
end if
shouming=request("shouming")
if productname="" or productid="" or bigclass="" or cl="" then
Response.Write("<script language=""javascript"">alert('产品名称、编号、类别、材料和说明都不能为空!');location='"&myself&"';</script>")
Response.End()
else
CommandText="insert into productinfo(productname,productid,bigclass,cl,sizes,salesmoney,shouming) Values('"&productname&"','"&productid&"','"&bigclass&"','"&cl&"','"&sizes&"','"&salesmoney&"','"&shouming&"')"
Conn.Execute CommandText
response.redirect"upfile.asp"
end if
end if
%>
<html>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="75%" border="0" cellspacing="1" cellpadding="5" bgcolor="#000000">
<form name="form2" method="post" action="">
<tr>
<td bgcolor="#F1f1f1" colspan="2">
<div align="center">产品信息修改</div>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" width="40%" align="center">产品名称:</td>
<td bgcolor="#FFFFFF">
<input type="text" name="productname"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">
<div align="center">产品编号:</div>
</td>
<td bgcolor="#FFFFFF">
<input type="text" name="productid">
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" align="center">产品类别:</td>
<td bgcolor="#FFFFFF">
<select name="bigclass">
<option value="<%=rs("bigclass")%>" selected><%=rs("bigclass")%></option>
<%set rsb=conn.execute("select * from bigclass order by id desc")
if rsb.eof then
response.write""
else
do while not rsb.eof%>
<option value="<%=rsb("bigclass")%>"><%=rsb("bigclass")%></option>
<%rsb.movenext
loop
end if
rsb.close
set rsb=nothing
%>
</select>
</td>
错误类型:
ADODB.Recordset (0x800A0CC1)
在对应所需名称或序数的集合中,未找到项目。
/abc/admin/addproductinfo.asp, 第 64 行
问题好像是出在:<select name="bigclass">
<option value="<%=rs("bigclass")%>" selected><%=rs("bigclass")%></option>
<%set rsb=conn.execute("select * from bigclass order by id desc")
if rsb.eof then
response.write""
else
do while not rsb.eof%>
<option value="<%=rsb("bigclass")%>"><%=rsb("bigclass")%></option>
<%rsb.movenext
loop
end if
rsb.close
set rsb=nothing
%>
</select>
要怎么改啊???? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询