Microsoft JET Database Engine 错误 '80040e14' 语法错误 (操作符丢失) 在查询表达式 'id=' 中。 /sh

u010379100 2013-04-28 03:32:07
Microsoft JET Database Engine 错误 '80040e14'

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

/shidai_manage/prohot/manage_product.asp,行 155

急求解决办法!!!!!!!!!11
...全文
589 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
qmnx 2013-04-30
  • 打赏
  • 举报
回复
连接符 & 两边需要加空格,你代码除了注释里的加了,其他都没加.
wwwwb 2013-04-28
  • 打赏
  • 举报
回复
rs.open "select * from [brand] where [id]=" & request("id"),conn
wwwwb 2013-04-28
  • 打赏
  • 举报
回复
代码太长,出错的是什么语句,将SQL语句贴出来看看
u010379100 2013-04-28
  • 打赏
  • 举报
回复
[color=#FF0000]源码:[/color] <% dim sql dim rs const PerPage=10 dim totalput dim CurrentPage dim TotalPage dim filename dim p_class,brand,p_field dim search,keyword dim cl,b_s dim class1 cl=trim(request("cl")) class1=trim(request("class")) if not isempty(request("page")) and IsNumeric(request("page")) then currentPage=cint(request("page")) else currentPage=1 end if keyword=trim(request("keyword")) search=request("search") p_class=request("p_class") brand=request("brand") p_field=request("p_field") '=================Clear Session=================== if request("clear_session") then Session("r_product_cl") = "" Session("r_product_class1") = "" Session("r_product_keyword") = "" Session("r_product_search") = "" Session("r_product_p_class") = "" Session("r_product_brand") = "" Session("r_product_p_field") = "" end if '=================Clear Session=================== '=================Session=================== if cl <> "" then Session("r_product_cl") = cl else cl = Session("r_product_cl") if class1 <> "" then Session("r_product_class1") = class1 else class1 = Session("r_product_class1") if search<>"" then Session("r_product_keyword") = keyword end if if keyword <> "" then Session("r_product_keyword") = keyword else keyword = Session("r_product_keyword") if request("page")<>"" then if search <> "" then Session("r_product_search") = search else search = Session("r_product_search") else Session("r_product_search") = search end if if p_class <> "" then Session("r_product_p_class") = p_class else p_class = Session("r_product_p_class") if brand <> "" then Session("r_product_brand") = brand else brand = Session("r_product_brand") if p_field <> "" then Session("r_product_p_field") = p_field else p_field = Session("r_product_p_field") '=================Session=================== if search=false then filename="manage_product.asp?" sql="select * from [prohot]" if not cl="" and not class1="" then if cl="p_class" then sql="select * from [prohot] where "&cl&" in ("&class1 & get_p_class_type(class1)&")" else sql="select * from [prohot] where "&cl&"="&class1 end if filename="manage_product.asp?cl="&cl&"&class="&class1&"&" end if else sql="select * from [prohot] where (p_name like '%"&keyword&"%' or p_width like '%"&keyword&"%' or spec like '%"&keyword&"%' or intro like '%"&keyword&"%')" if p_class<>"0" and p_class<>"" then sql=sql & " and (p_class in ("&p_class & get_p_class_type(p_class)&"))" end if if brand<>"-1" then sql=sql & " and brand="&brand end if filename="manage_product.asp?keyword="&keyword&"&search=true&p_class="&p_class&"&brand="&brand&"&p_field="&p_field&"&" end if sql=sql & " order by add_date desc,p_class desc,look_count desc,p_id desc" set rs=server.CreateObject("adodb.recordset") rs.open sql,conn,1,1 totalPut=rs.recordcount if totalput mod perpage=0 then totalpage=totalput\perpage else totalpage=totalput\perpage+1 end if if currentPage<1 then currentPage=1 end if if currentPage>totalpage then currentPage=totalpage end if if not rs.eof then rs.move (currentPage-1)*perpage end if function get_p_class(type_id) dim rs set rs=server.createobject("adodb.recordset") rs.open "select * from [p_class] where id="&type_id,conn if not rs.eof then 'if rs("layer")>0 then ' get_p_class = get_p_class(rs("parent")) & " _> " & Server.HTMLEncode(rs("c_name")) 'else get_p_class = Server.HTMLEncode(rs("c_name")) 'end if else get_p_class = "未知类别" end if rs.close set rs=nothing end function function get_p_brand(brand_id) dim rs set rs=server.createobject("adodb.recordset") rs.open "select * from [brand] where id="&request("id"),conn if not rs.eof then get_p_brand = Server.HTMLEncode(rs("name")) else get_p_brand = "无品牌" end if rs.close set rs=nothing end function %>

7,732

社区成员

发帖
与我相关
我的任务
社区描述
Microsoft Office Access是由微软发布的关系数据库管理系统。它结合了 MicrosoftJet Database Engine 和 图形用户界面两项特点。
社区管理员
  • Access
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧