主题:问操作符丢失的问题
<%
articalid=request.Form("articalid")
set conn=server.CreateObject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.MapPath("db_gonghuiwb.mdb")
if not request.Form("deal")="" then
exec="select * from artical where articalid="+articalid+""
set rs=server.CreateObject("adodb.recordset")
rs.open exec,conn,1,3
rs("deal")=request.Form("deal")
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
else
set conn=server.CreateObject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.MapPath("db_gonghuiwb.mdb")
exec="delete * from artical where articalid="+articalid+""
conn.execute exec
conn.close
set conn=nothing
end if
%>
修改操作可以执行 但是删除操作出错
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] 语法错误 (操作符丢失) 在查询表达式 'articalid=' 中。
/do_artical.asp, 第 30 行
到底问题在哪??
articalid=request.Form("articalid")
set conn=server.CreateObject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.MapPath("db_gonghuiwb.mdb")
if not request.Form("deal")="" then
exec="select * from artical where articalid="+articalid+""
set rs=server.CreateObject("adodb.recordset")
rs.open exec,conn,1,3
rs("deal")=request.Form("deal")
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
else
set conn=server.CreateObject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.MapPath("db_gonghuiwb.mdb")
exec="delete * from artical where articalid="+articalid+""
conn.execute exec
conn.close
set conn=nothing
end if
%>
修改操作可以执行 但是删除操作出错
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] 语法错误 (操作符丢失) 在查询表达式 'articalid=' 中。
/do_artical.asp, 第 30 行
到底问题在哪??