语法错误 (操作符丢失) 在查询表达式 'id=' 中!!??
代码如下:
<%
id=request.Form( "id ")
kfs=request.Form( "kfs ")
lxr=request.Form( "lxr ")
tel=request.Form( "tel ")
ccase=request.Form( "ccase ")
reason=request.Form( "reason ")
starttime=request.Form( "starttime ")
overtime=request.Form( "overtime ")
worker=request.Form( "worker ")
spr=request.Form( "spr ")
set conn=server.createobject( "adodb.connection ")
conn.open "driver={microsoft access driver (*.mdb)};dbq= "&server.mappath( "gustb.mdb ")
exec= "select * from beian where id= "+id
set rs=server.createobject( "adodb.recordset ")
rs.open exec,conn,1,3
%>
错误类型:
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] 语法错误 (操作符丢失) 在查询表达式 'id= ' 中。
/asp 备分/baxg.asp, 第 16 行
ID字段的类型是自动编号,为什么这么写不对呢?
------解决方案--------------------试试
exec= "select * from beian where id = "&id
或者
exec= "select * from beian where i= "&id& " "