我用DREAMWEAVER 写一个更新程序遇到问题

bobozc bobozc 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
sj和bs是上页传过来的数据
sj 是int型的
bs 是varchar型的

用bs 做条件时就出错 说列名无效
用sj 做条件就没问题


<%

if(request("sj") <> "") then setjf__w = request("sj")

if(request("bs") <> "") then setjf__o = request("bs")

%>
<%

set setjf = Server.CreateObject("ADODB.Command")
setjf.ActiveConnection = MM_soccersql_STRING
setjf.CommandText = "UPDATE dbo.jf SET zw ='1' WHERE bssj in (" + Replace(setjf__w, "'", "''") + ") and jfsx='1' and bs in (" + Replace(setjf__o, "'", "''") + ")"
setjf.CommandType = 1
setjf.CommandTimeout = 0
setjf.Prepared = true
setjf.Execute()

%>
...全文
评论 1
收藏 已收藏
分享
返回顶部
bobozc
ASP 28,401 成员 356,940 内容