asp修改问题

张三大胖 2006-07-25 04:41:17
短信识别码为SELECT * FROM v_shenp WHERE (ISNULL(审批意见, '') IN ('转张贺昌')) AND (公司名称 IN ('松一公司', '中冀汽修(松一)','冀东华明(松一)', '松一修理厂')) 为文本字段的值
修改时出错
<!--#include file="inc/conn.asp"-->
<!-- #include file="inc/MD5.asp" -->
<%id = request("id")
if id="" then
Response.end
end if
password = request("password")
password1 = request("password1")
xingming = request("xingming")
gsid = request("gsid")
mingcheng = request("mingcheng")
quancheng = request("quancheng")
edu = request("edu")
zhuanfa = request("zhuanfa")
smsid = request("smsid")
riqi = request("riqi")
dengji = request("dengji")
quanxian = request("quanxian")
dianhua = request("dianhua")
shouji = request("shouji")
jieguo = request("jieguo")
jinyong = request("jinyong")
duanxin = request("duanxin")
moshi = request("moshi")
huifu = request("huifu")
juese = request("juese")
yinhang = request("yinhang")
shibie = request("shibie")
fanwei = request("fanwei")
chaxun = request("hangshu")
beizhu = request("beizhu")
xingbie = request("xingbie")



if not IsNumeric(gsid) then
conn.close
set conn = nothing
response.write "<script>alert('公司ID应为数字');history.go(-1);</script>"
response.end
end if

if not IsNumeric(smsid) then
conn.close
set conn = nothing
response.write "<script>alert('SMSID应为数字');history.go(-1);</script>"
response.end
end if

if not IsNumeric(quanxian) then
conn.close
set conn = nothing
response.write "<script>alert('权限应为数字');history.go(-1);</script>"
response.end
end if

if not IsNumeric(chaxun) then
conn.close
set conn = nothing
response.write "<script>alert('查询行数应为数字');history.go(-1);</script>"
response.end
end if

if not IsNumeric(edu) then
conn.close
set conn = nothing
response.write "<script>alert('授信额度应为数字');history.go(-1);</script>"
response.end
end if

if (gsid="") then
conn.close
set conn = nothing
response.write "<script>alert('请输入公司ID!');history.go(-1);</script>"
response.end
end if

if (password<>password1) then
conn.close
set conn = nothing
response.write "<script>alert('两次密码输入不一致');history.go(-1);</script>"
response.end
end if


if (password="") then
SQL="Update t_UserLogin Set 查询行数='"&chaxun&"',姓名='"&xingming&"',gsid='"&gsid&"',公司名称old='"&mingcheng&"',公司全称old='"&quancheng&"',授信额度='"&edu&"',性别='"&xingbie&"',转发权='"&zhuanfa&"',SMSID='"&smsid&"',注册时间='"&riqi&"',等级='"&dengji&"',权限='"&quanxian&"',联系电话='"&dianhua&"',手机号码='"&shouji&"',同意结果='"&jieguo&"',是否禁用='"&jinyong&"',短信开启='"&duanxin&"',查询模式='"&moshi&"',成功回复='"&huifu&"',用户角色='"&juese&"',付出银行='"&yinhang&"',短信识别码='"&shibie&"',查询范围='"&fanwei&"',备注='"&beizhu&"' where id="&id
conn.Execute SQL
else
SQL="Update t_UserLogin Set 密码='"&md5(password)&"',查询行数='"&chaxun&"',姓名='"&mingzi&"',gsid='"&gsid&"',公司名称old='"&mingcheng&"',公司全称old='"&quancheng&"',授信额度='"&edu&"',性别='"&xingbie&"',转发权='"&zhuanfa&"',SMSID='"&smsid&"',注册时间='"&riqi&"',等级='"&dengji&"',权限='"&quanxian&"',联系电话='"&dianhua&"',手机号码='"&shouji&"',同意结果='"&jieguo&"',是否禁用='"&jinyong&"',短信开启='"&duanxin&"',查询模式='"&moshi&"',成功回复='"&huifu&"',用户角色='"&juese&"',付出银行='"&yinhang&"',短信识别码='"&shibie&"',查询范围='"&fanwei&"',备注='"&beizhu&"' where id="&id
conn.Execute SQL
end if

response.write "<script>alert('修改成功!');window.location.href='guanli.asp';</script>"
%>
...全文
185 5 打赏 收藏 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
张三大胖 2006-07-26
  • 打赏
  • 举报
回复
好佩服zhenmeiyisi啊 强
zhenmeiyisi 2006-07-25
  • 打赏
  • 举报
回复
也就是怎么把《SELECT * FROM v_shenp WHERE (ISNULL(审批意见, '') IN ('转张贺昌')) AND (公司名称 IN ('松一公司', '中冀汽修(松一)','冀东华明(松一)', '松一修理厂')) 》看成普通的文本字段!!
====================================================================

a="SELECT * FROM v_shenp WHERE (ISNULL(审批意见, '') IN (' 转张贺昌 ')) AND (公司名称 IN ('松一公司 ', ' 中冀汽修(松一) ',' 冀东华明(松一) ', ' 松一修理厂 '"

a=replace(a,"'","''") '把单引号替换成双引号

然后这样 短信识别码='" & a & "'
张三大胖 2006-07-25
  • 打赏
  • 举报
回复
是松花江
TaoTaoYou 2006-07-25
  • 打赏
  • 举报
回复
松一公司? 先问下是不是日本的?
张三大胖 2006-07-25
  • 打赏
  • 举报
回复
也就是怎么把《SELECT * FROM v_shenp WHERE (ISNULL(审批意见, '') IN ('转张贺昌')) AND (公司名称 IN ('松一公司', '中冀汽修(松一)','冀东华明(松一)', '松一修理厂')) 》看成普通的文本字段!!

28,402

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧