我用DREAMWEAVER 写一个更新程序遇到问题
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()
%>