| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1065 人关注过本帖
标题:Microsoft JET Database Engine (0x80040E14)语法错误 (操作符丢失) 在查询 ...
只看楼主 加入收藏
xinjiye
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2009-11-11
结帖率:100%
收藏
 问题点数:0 回复次数:5 
Microsoft JET Database Engine (0x80040E14)语法错误 (操作符丢失) 在查询表达式 'Id =' 中。
请帮忙看看错在哪里.谢谢了.代码如下:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/BBS1.asp" -->
<%

if(request("id") <> "") then Command1__MM_hits = request("id")

%>
<%
Dim rs__MMColParam
rs__MMColParam = "1"
If (Request.QueryString("Id") <> "") Then
  rs__MMColParam = Request.QueryString("Id")
End If
%>
<%
Dim rs
Dim rs_numRows

Set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = MM_BBS1_STRING
rs.Source = "SELECT * FROM 论坛 WHERE Id = " + Replace(rs__MMColParam, "'", "''") + ""
rs.CursorType = 0
rs.CursorLocation = 2
rs.LockType = 1
rs.Open()

rs_numRows = 0
%>
<%

set Command1 = Server.CreateObject(")
Command1.ActiveConnection = MM_BBS1_STRING
= "UPDATE 论坛  SET hits=hits+1  WHERE Id =" + Replace(Command1__MM_hits, "'", "''") + " "
= 1
= 0
Command1.Prepared = true
Command1.Execute()

%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<table width="775" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td class="right-td1" height="30" align="center">阅读帖子</td>
  </tr>
  <tr>
    <td valign="top" class="right-td2"><br>
        <table align="center" class="bbs_tdborder" width="95%"  border="1" cellpadding="5" cellspacing="3" bordercolor="#CCCCCC">
          <tr>
            <td>帖子主题:</td>
          </tr>
          <tr>
            <td align="center" height="86"><table width="100%"  border="0" cellspacing="5" cellpadding="0">
                <tr>
                  <td class="right-td3" rowspan="2" valign="MIDDLE" align="CENTER" width="12%"><br>
                      <br>
                  </td>
                  <td height="49" valign="TOP" width="88%">&nbsp;</td>
                </tr>
                <tr>
                  <td height="25" align="RIGHT"><hr width="98%" size="1" noshade>
                  个人签名:</td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="55%">发帖时间:</td>
                  <td align="RIGHT" width="45%">回复此帖 || <a href="addbbs.asp">发表新帖</a> || 修改帖子 || 删除帖子 </td>
                </tr>
            </table></td>
          </tr>
        </table>
        <p>相关回帖: </p>
        <hr align="center" width="730" size="1">
        <table align="center" width="95%"  border="1" cellpadding="5" cellspacing="3" bordercolor="#CCCCCC">
          <tr>
            <td width="7%" align="right">标题:</td>
            <td width="93%">&nbsp;</td>
          </tr>
          <tr>
            <td align="right">内容:</td>
            <td valign="top">&nbsp;</td>
          </tr>
          <tr align="CENTER">
            <td colspan="2"><span class="style3"></span>&nbsp; 回复于:</td>
          </tr>
        </table>
        <hr align="center" width="730" size="1" noshade></td>
  </tr>
</table>
</body>
</html>
<%
rs.Close()
Set rs = Nothing
%>
搜索更多相关主题的帖子: JET Database Engine Microsoft 操作符 
2009-11-11 15:58
aspic
Rank: 17Rank: 17Rank: 17Rank: 17Rank: 17
等 级:贵宾
威 望:51
帖 子:2258
专家分:8050
注 册:2008-2-18
收藏
得分:0 
没有取到值
2009-11-11 16:27
xinjiye
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2009-11-11
收藏
得分:0 
帮忙指点一下如何改啊.
2009-11-11 18:15
msgj
Rank: 8Rank: 8
等 级:蝙蝠侠
威 望:4
帖 子:190
专家分:914
注 册:2009-10-3
收藏
得分:0 
rs.Source = "SELECT * FROM 论坛 WHERE Id = '" & Replace(rs__MMColParam,"'","''") & "'"
2009-11-11 22:07
aspic
Rank: 17Rank: 17Rank: 17Rank: 17Rank: 17
等 级:贵宾
威 望:51
帖 子:2258
专家分:8050
注 册:2008-2-18
收藏
得分:0 
DW生成的代码没谁愿意看
2009-11-12 09:00
xinjiye
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2009-11-11
收藏
得分:0 
多谢
2009-11-13 08:57
快速回复:Microsoft JET Database Engine (0x80040E14)语法错误 (操作符丢失) 在 ...
数据加载中...
 
   



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

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