ASP中 数据修改和删除问题
1)修改MicrosoftVBScript编译器错误(0x800A03F2)缺少标识符/yigoon/admin/news_anclass_save.asp,line16...
1)修改
Microsoft VBScript 编译器错误 (0x800A03F2)
缺少标识符
/yigoon/admin/news_anclass_save.asp, line 16, column 23
dim newid,classname,px,class,i,_
----------------------^
部分源码:
<%dim newid,classname,px,class,i(提示这行有错)
if request("action")="update" then
for i=1 to request.form("newid").count
newid=replace(request.form("newid")(i),"'","")
classname=replace(request.form("classname")(i),"'","")
class=replace(request.form("class")(i),"'","")
px=replace(request.form("px")(i),"","")
if replace(request.form("classname")(i),"'","")="" then
%>
<script language=javascript>
history.back()
alert("请填写新闻标题!")
</script>
<%
Response.End
end if
conn.execute("update shop_news_class set classname='"&classname&"',class='"&class&"',px='"&px&"' where id="&newid)
next
conn.close
set conn=nothing
response.write "<p align=center><font color=red>新闻设置成功!<br>2秒钟后返回上页!</font>"
response.write "<meta http-equiv=""refresh"" content=""2;url=news_anclass.asp"">"
end if
%>
2)删除
Microsoft OLE DB Provider for SQL Server (0x80040E14)
第 1 行: '=' 附近有语法错误。
/yigoon/admin/news_anclass_kill.asp, 第 18 行
部分源码:
<%dim id
id=request("id")
conn.execute("delete From shop_news_class where id=" &id)(提示这行有错)
conn.close
set conn=nothing
response.write "<p align=center><font color=red>新闻已经被删除!<br>2秒钟后返回上页!</font>"
response.write "<meta http-equiv=""refresh"" content=""2;url=news_anclass.asp"">"
response.end
%> 展开
Microsoft VBScript 编译器错误 (0x800A03F2)
缺少标识符
/yigoon/admin/news_anclass_save.asp, line 16, column 23
dim newid,classname,px,class,i,_
----------------------^
部分源码:
<%dim newid,classname,px,class,i(提示这行有错)
if request("action")="update" then
for i=1 to request.form("newid").count
newid=replace(request.form("newid")(i),"'","")
classname=replace(request.form("classname")(i),"'","")
class=replace(request.form("class")(i),"'","")
px=replace(request.form("px")(i),"","")
if replace(request.form("classname")(i),"'","")="" then
%>
<script language=javascript>
history.back()
alert("请填写新闻标题!")
</script>
<%
Response.End
end if
conn.execute("update shop_news_class set classname='"&classname&"',class='"&class&"',px='"&px&"' where id="&newid)
next
conn.close
set conn=nothing
response.write "<p align=center><font color=red>新闻设置成功!<br>2秒钟后返回上页!</font>"
response.write "<meta http-equiv=""refresh"" content=""2;url=news_anclass.asp"">"
end if
%>
2)删除
Microsoft OLE DB Provider for SQL Server (0x80040E14)
第 1 行: '=' 附近有语法错误。
/yigoon/admin/news_anclass_kill.asp, 第 18 行
部分源码:
<%dim id
id=request("id")
conn.execute("delete From shop_news_class where id=" &id)(提示这行有错)
conn.close
set conn=nothing
response.write "<p align=center><font color=red>新闻已经被删除!<br>2秒钟后返回上页!</font>"
response.write "<meta http-equiv=""refresh"" content=""2;url=news_anclass.asp"">"
response.end
%> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询