| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2577 人关注过本帖
标题:Microsoft JET Database Engine (0x80040E14)语法错误 (操作符丢失) 在查询 ...
只看楼主 加入收藏
海洋滴水2
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2010-11-10
结帖率:0
收藏
已结贴  问题点数:20 回复次数:6 
Microsoft JET Database Engine (0x80040E14)语法错误 (操作符丢失) 在查询表达式 'newsid=' 中
各位大侠,帮我看看哪里出问题了,谢谢谢谢,我贴出来的这段代码运行出来显示
Microsoft JET Database Engine (0x80040E14)
语法错误 (操作符丢失) 在查询表达式 'newsid=' 中。
/信息参考数据库/manage.asp, 第 99 行(标红的那段)

这段代码是搞什么的我都看不懂,热心的朋友帮我解释一下吧,谢谢了
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--#include file="const.asp" -->
<!--#include file="Connections/conn.asp" -->
<%
if session("superuserpass")<>"yes" then
response.redirect "login.asp"
end if
%>
<%
Set rstObj = Server.CreateObject ("ADODB.Recordset")
Set rstObj1 = Server.CreateObject ("ADODB.Recordset")
Set rstObj2 = Server.CreateObject ("ADODB.Recordset")
  
%>
<html>
<head>
<title>审读新文章</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body,td,input {
    font-family: "宋体";
    font-size: 9pt;
}

-->
</style>
<SCRIPT language=javascript>
function click() {if (event.button==2) {alert('您的右键在本页中暂无效!复制、粘贴请用Ctrl+C与Ctrl+V');}}document.onmousedown=click
</SCRIPT>
<SCRIPT language=JavaScript>
<!--Hide script from older browsers
function validate()
{
 if (document.modify.title.value == ""){
    alert("提示:\n\n文章篇名不能为空!");
    document.modify.title.focus();
    return (false);
 }

if (document.modify.keywords.value == ""){
    alert("提示:\n\n文章关键词不能为空!");
    document.modify.keywords.focus();
    return (false);
 }
 
 if (document.modify.publishtime.value == "" )
  {
    alert("提示:\n\n发布时间不能为空!");
    document.modify.publishtime.focus();
    return (false);
  }
 
 
 
if (document.modify.fulltext.value == "" )
  {
    alert("提示:\n\n文章全文不能为空!");
    document.modify.fulltext.focus();
    return (false);
  }



   else
     return (true);
}
//End hiding script from older browsers-->
</script>

<script language="JavaScript">
<!--

var new_window1 = null;

function classguanli() {

new_window1 = window.open('class.asp', 'class', 'width=390,height=450,resizable=1,scrollbars=0,top=0,left=0');//你可以改变链接和窗口大小

}

var new_window2 = null;

function originguanli() {

new_window2 = window.open('origin.asp', 'origin', 'width=796,height=560,resizable=1,scrollbars=1,top=0,left=0');//你可以改变链接和窗口大小

}

//-->
</script>
</head>

<body bgcolor="#eeeeee" topmargin="10" leftmargin="10" rightmargin="10" topmargin="0" marginwidth="0" marginheight="0">
<center>
<fieldset  id="modifysfield" style="width:760;height:100%">
  <legend><font color="#3399CC"><b>☆审读新文章☆</b></font></legend>
<%session("serial")=request("serial")
rstObj.open "select * from news where newsid="&session("serial"),cnndb,3,2
'rstObj.filter="newsid='"&session("serial")&"'"
if rstObj.eof then
response.write session("serial")&"不存在,发生错误!"
else
%>  
  <form action="managecheck.asp" method="post" name="modify" id="modify"  onSubmit="return validate()">
    <table width="750" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center" valign="middle">原 题 名:</td>
        <td colspan="2"><%=rstobj("original_title")%></td>
      </tr>
      <tr>
        <td width="64" align="center" valign="middle">题  名:</td>
        <td colspan="2"> <input name="title" type="text" id="title" size="78" maxlength="255" value=<%=replace(rstobj("title")," ","&nbsp")%>>
        </td>
      </tr>
     
       <tr>
        <td width="64" align="center" valign="middle">关 键 词:</td>
        <td colspan="2"> <input name="keywords" type="text" id="keywords" size="78" maxlength="255" value=<%=rstobj("keywords")%>> (词间请用 全角顿号 分隔)
        </td>
      </tr>
      
      <tr>
        <td align="center" valign="middle">类  型:</td>
        <td width="627">
          <%rstObj1.Open "select * from newsclass order by class",cnnDB, 3 , 2
               i=0
               do while not rstObj1.eof%>
          <input name="classid<%=i%>" type="checkbox" id="classid<%=i%>" value="<%=rstobj1("classid")%>:<%=rstobj1("class")%>" <%
          rstObj2.Open "select * from recordclass where recordid="&session("serial"),cnnDB, 3 , 2
          do while not rstobj2.eof
          if rstobj2("classid")=rstobj1("classid") then%>
          checked
<%        end if        
 rstobj2.movenext
          loop
          rstobj2.close
         
          %>> <%=rstobj1("class")%>
          <%if (i+1) mod 4 =0  then%>
          <br>
          <%end if%>
          <% rstobj1.movenext
               i=i+1
                    loop
                    rstobj1.close%>
        </td>
        <td width="59"> <input name="guanli1" type="button" id="guanli1" value="管理" onclick="javascript:classguanli()">
          <input name="shuaxin" type="button" id="shuaxin" value="刷新" onclick="javascript:location.reload()">
        </td>
      </tr>
      <tr>
        <td align="center" valign="middle">发布时间:</td>
        <%year1=right(year(rstobj("publishtime")),2)
        month1=month(rstobj("publishtime"))
        if len(month1)=1 then
        month1="0"&month1
        end if
        day1=day(rstobj("publishtime"))
        if len(day1)=1 then
        day1="0"&day1
        end if
        
        %>
        <td colspan="2"> <input name="publishtime" type="text" id="publishtime" value="<%=year1&"-"&month1&"-"&day1%>" size="8" maxlength="8">
          (为网上公布的发表时间;格式:年-月-日;请确保日期有效)</td>
      </tr>
      <tr>
        <td align="center" valign="middle"><font color="red">是否审读:</font></td>
        <td colspan="2"> <input type="radio" name="haveread" value="true"  checked>
         
          <input type="radio" name="haveread" value="false">
          否 </td>
      </tr>
      <tr>
        <td align="center" valign="middle"><font color="red">是否有效:</font></td>
        <td colspan="2"> <input type="radio" name="valid" value="true" checked>
         
          <input type="radio" name="valid" value="false" >
          否 </td>
      </tr>
      <tr>
        <td align="center" valign="middle"><font color="red">生命周期:</font></td>
        <td colspan="2"> <select name="lifecycle" size=1><%for z=0 to 20%><option value="<%=z%>"  <%if z=2 then%> selected <%end if%>><%=z%></option><%next%> </select>
          天 (从提交日算起,<font color="red">提交时间:<%=rstobj("submittime")%></font>)</td>
      </tr>
      <tr>
        <td align="center" valign="middle">标  识:</td>
        <td colspan="2"><a href="<%=rstobj("identifier")%>" target="_blank"><%=rstobj("identifier")%></a></td>
      </tr>
      <tr>
        <td align="center" valign="middle">来  源:</td>
        <td colspan="2"> <select name="origin" size="1">
            <%rstObj1.Open "select * from origin order by originname",cnnDB, 3 , 2
               do while not rstObj1.eof%>
            <option value="<%=rstobj1("originid")%>" <%if rstobj1("originid")=rstobj("originid") then%>selected<%end if%>><%=rstobj1("originname")%></option>
            <% rstobj1.movenext
                    loop
                    rstobj1.close%>
          </select>
            
          <input name="guanli2" type="button" id="guanli2" value="管理" onclick="javascript:originguanli()">
          <input name="shuaxin1" type="button" id="shuaxin1" value="刷新" onclick="javascript:location.reload()">
        </td>
      </tr>
      <tr>
        <td height="23" align="center" valign="middle">图  片:</td>
        <td colspan="2">
          <%if rstobj("picture")=true then%>
          <font color="red">有</font>
          <%else%>
          无 <a href="javascript:tmp=window.open('addpicture1.asp?serial=<%=rstobj("newsid")%>&num=0','addpicture','resizable=yes,top=0,left=0,scrollbars=yes');tmp.focus();"><font color="red">添加图片>></font></a>
          <%end if%>
        </td>
        <%if  rstobj("picture")=true then
     picture="y"
     else
     picture="n"
     end if
       %>
      </tr>
      <%if rstobj("picture")=true then
        %>
      <tr>
        <td align="center" valign="middle"><font color="red">图片审查:</font></td>
        <td colspan="2" valign="middle">
          <%rstObj1.Open "select * from picture where recordid="&session("serial"),cnnDB, 3 , 2
    if rstobj1.eof and rstobj1.bof then
    picture="n"%>
          <font color="red"> 文章图片记录已不存在! </font> <input type="hidden" name="picexist" value="false">
          <%else
           j=0
           x=0
         %>
          <table  border="0" cellspacing="0" cellpadding="0">
            <%do while not rstObj1.eof
            j=j+1
            u=Cint(Mid(rstobj1("pictureid"),2))
            if x<u then
            x=u
            end if
            %>
            <tr>
              <td><img src="images/<%=session("serial")&rstobj1("pictureid")%>.jpg"></td>
            </tr>
            <input type="hidden" name="picimage<%=j%>" value="images/<%=session("serial")&rstobj1("pictureid")%>.jpg" >
            <input type="hidden" name="picid<%=j%>" value="<%=rstobj1("pictureid")%>" >
            <tr>
              <td valign="middle">图片说明:
                <input type="text" name="picturenote<%=j%>" value="<%=rstobj1("picturenote")%>" maxlength="255" size="50">
              </td>
            </tr>
            <tr>
              <td> <font color="red">是否合格:</font> <input type="radio" name="picpass<%=j%>" value="true" <%if rstobj1("picpass")=true then %> checked <%end if%>>
               
                <input type="radio" name="picpass<%=j%>" value="false" <%if rstobj1("picpass")=false then %> checked <%end if%>>
                否 </td>
            </tr>
            <%rstobj1.movenext
       loop%>
          </table>
          <%end if
       rstobj1.close
       %>
        </td>
        <input type="hidden" name="picnum" value="<%=j%>">
      </tr>
      <tr>
        <td height="32" align="center" valign="middle">&nbsp;</td>
        <td colspan="2"> <a href="javascript:tmp=window.open('addpicture1.asp?serial=<%=rstobj("newsid")%>&num=<%=x%>','addpicture','resizable=yes,top=0,left=0,scrollbars=yes');tmp.focus();"><font color="red">还要添加图片>></font></a></td>
      </tr>
      <%end if%>
      <input type="hidden" name="picinfor" value="<%=picture%>">
      <tr>
        <td align="center" valign="middle">全  文:</td>
        <td colspan="2"> <textarea name="fulltext" cols="90" rows="11" id="fulltext"><%=rstobj("fulltext")%></textarea>
        </td>
      </tr>
    </table>
   <br>
  <div align="center">
      <input name="classcount" type="hidden" id="classcount" value="<%=i%>">
      <input name="original_title" type="hidden" id="original_title" value="<%=rstobj("original_title")%>">
  <input name="identifier" type="hidden" id="identifier" value="<%=rstobj("identifier")%>" >
      <input type="button" name="Button" onclick="window.close()" value="放弃">
         <a href="readdelete.asp?serial=<%=session("serial")%>"><font color="red">删重</font></a>
     <input type="hidden" name="serial" value="<%=session("serial")%>">  
                <input type="submit" name="xiugai" value="修改">       
                       </div>
</form>
<%end if
%>
</fieldset>
</center>
<%
set rstobj=nothing
set rstobj1=nothing
set rstobj2=nothing
cnndb.close
set cnndb=nothing
%>
</body>
</html>
搜索更多相关主题的帖子: 操作符 Microsoft Engine Database JET 
2010-11-10 15:44
dzt0001
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:蒙面侠
威 望:5
帖 子:1281
专家分:4998
注 册:2005-10-12
收藏
得分:6 
看看session("serial")是不是为空?

----我怎能在别人的苦难面前转过脸去----
2010-11-10 16:32
海洋滴水2
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2010-11-10
收藏
得分:0 
回复 2楼 dzt0001
怎么看呢?
2010-11-11 09:00
hams
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:18
帖 子:912
专家分:3670
注 册:2008-7-30
收藏
得分:6 
确定session("serial")的变量类型,如果不是数字型就有可能出错

俺不高手,俺也是来学习的。
俺的意见不一定就对,当你不认同时请点忽视按钮。
当走到十字路口不知该如何走时,可在论坛问下路,但你若希望别人能一路把你送到目的地,显然是不现实的,因为别人也有自己要走的路。
2010-11-11 09:03
海洋滴水2
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2010-11-10
收藏
得分:0 
回复 4楼 hams
那怎么确定嘛
2010-11-11 09:37
hnhhydh
Rank: 1
等 级:新手上路
帖 子:2
专家分:7
注 册:2008-10-13
收藏
得分:6 
看看你的数据库中对应的列名有没有“newsid”,我不能确定,你可以参考下。
2010-11-11 22:03
hams
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:18
帖 子:912
专家分:3670
注 册:2008-7-30
收藏
得分:0 
简单的问题找本书看看

俺不高手,俺也是来学习的。
俺的意见不一定就对,当你不认同时请点忽视按钮。
当走到十字路口不知该如何走时,可在论坛问下路,但你若希望别人能一路把你送到目的地,显然是不现实的,因为别人也有自己要走的路。
2010-11-12 08:35
快速回复:Microsoft JET Database Engine (0x80040E14)语法错误 (操作符丢失) 在 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.023403 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved