注册 登录
编程论坛 ASP技术论坛

Microsoft JET Database Engine (0x80040E14)语法错误 (操作符丢失) 在查询表达式 'Id = or SubjectId

xinjiye 发布于 2009-11-11 15:55, 656 次点击
请帮忙看看错在哪里?谢谢了.代码如下

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

if(Request("id") <> "") then Command1__MM_id = Request("id")

%>
<%

set Command1 = Server.CreateObject(")
Command1.ActiveConnection = MM_BBS1_STRING
= "DELETE FROM 论坛  where Id = " + Replace(Command1__MM_id, "'", "''") + " or SubjectId = " + Replace(Command1__MM_id, "'", "''") + " "
= 1
= 0
Command1.Prepared = true
Command1.Execute()

%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<meta http-equiv="refresh" content="2;URL=index1.asp">
</head>
<body bgcolor="#FFFFFF">
 已经成功删除帖子,2秒钟后自动返回论坛
</body>
</html>
3 回复
#2
aspic2009-11-11 16:28
Command1__MM_id 没有值
#3
chenguoxing5172009-11-11 16:52
id没为空
#4
xinjiye2009-11-11 18:16
帮忙改一下.好吗.谢谢了
1