语法错误 (操作符丢失) 在查询表达式 'scid=' 中

来源:百度知道 编辑:UC知道 时间:2024/06/18 23:03:38
我在后台添加商品时,在商品类别的大类中如果没有小类别,就出现以下提示:(但如果同时输入了大、小类别,就能成功添加),请帮忙更改,谢谢,15分送上

addsave.asp, 第 34 行

<!--#include file="session.asp"-->
<!--#include file="conn.asp"-->
<%
if request.form("sp_name")="" then
response.write"<script language=javascript>alert('商品名称必须填写');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if

if not isnumeric(request.form("jifen")) or not isnumeric(request.form("memprice")) or not isnumeric(request.form("vipprice")) or not isnumeric(request.form("marprice")) then
response.write"<script language=javascript>alert('商品价格和积分请采用数字');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if

function html(constring)
constring=replace(constring,CHR(13),"&q

你可以用err 来判断错误去试一下,
你可以在if request.form("sp_name")="" then 上一行加上on error resume next
在37行rs.open sql,conn,1,1下一行加上这段语句来判断错误!
if err.number>0 then
response.write("错误号:"&err.number&"<br>错误描述:"&err.description)
………
else
………
end if
我也遇到过类似的错误,我是这样解决的,希望能够帮到你

你最好在接收小类的时候,判断是否小类的值为空...
sclassid=request("scid")
这个后面加个判断.或者你在添加之前就用JS脚本判断是否操作正确.