asp 语法修改

来源:百度知道 编辑:UC知道 时间:2024/07/08 01:22:38
有谁能帮我修改一下么~
错误如下
Microsoft JET Database Engine 错误 '80040e14'

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

/fushikangkeji/admin/job51.asp,行 79
____________________________________________________

代码如下
<%set rs1=server.createobject("adodb.recordset")
sql="select * from [job_info] where jobid="&rs("jobid")&""
rs1.open sql,conn,1,3
if not rs1.eof then
response.write rs1("jobname")
end if
rs1.close
set rs1=nothing
%>

jobid应该是个数字型的吧?

sql="select * from [job_info] where jobid="&rs("jobid")&"" 改成

sql="select * from [job_info] where jobid="&rs("jobid")

rs("jobid")是不是没东西?看检查下

sql="select * from [job_info] where jobid="&rs("jobid")
你后面多了两个引号。

请检查你所传递的参数或者把你传递参数的代码贴出来

sql="select * from [job_info] where jobid="&rs("jobid")&"" 改成

sql="select * from [job_info] where jobid='"&rs("jobid")&"'"