<%
Dim member
Set member = jsObject()
dim dbconnection,uplist,DBPath,SQL,Sort,Lbound,Ubound
Dim id=request("jsoncallback")
set dbconnection=Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("a.mdb")
dbconnection.Open "provider=microsoft.jet.oledb.4.0;data source="&dbpath
'如果 SQL="select ContentID from Content where ContentID=247"这么写 就能执行
'如果 SQL="select ContentID from Content where ContentID="&id 就出错,页面显示 语法错误,但是我 单独 访问 这个 asp 能运行 不报错
SQL="select ContentID from Content where ContentID=247"
SET uplist=dbconnection.EXECUTE(SQL)
member("code") = ""&uplist(0)&""
member("errmsg") = "\u5bf9\u8c61ID\u4e0d\u5408\u6cd5"
response.write request.querystring("jsoncallback")&"("&member.jsString&")"
Set member = Nothing
%>
问题:
'如果 SQL="select ContentID from Content where ContentID=247"
这么写 就能执行,json 接收正常
'如果 SQL="select ContentID from Content where ContentID="&id
就出错,页面显示 语法错误,但是我 单独 访问 这个 asp 能运行 不报错
这里 sql 我要 获取动态 数值
请 高手帮助 解决下,我实在是 不知道是哪问题了
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。