注册 登录
编程论坛 ASP技术论坛

Microsoft OLE DB Provider for SQL Server 错误 '80040e14' “=”附近有语法错误。/2/test3.asp,

a111234567 发布于 2023-07-20 19:43, 9821 次点击
<!--#include file = "conn.asp"-->

<%
set rs = server.createobject("ADODB.recordset")
id = request("id")
strSQL = "select * from admin1 where id = "& id
rs.open strSQL,conn,1,3
rs.close
%>
4 回复
#2
a1112345672023-07-20 20:17
/2/test3.asp,行 7
#3
a1112345672023-07-20 22:55
谁能帮忙?
#4
阳光上的桥2023-07-24 16:42
是这个地方报错吗:

strSQL = "select * from admin1 where id = "& id

检查 id 的值,有可能是空,会导致语法错误
#5
apull2023-07-24 16:58
id = request("id")后判断下id的值
1