[Microsoft][ODBC Microsoft Access Driver] 语法错误 (操作符丢失) 在查询表达式 'ID =' 中。 5
错误类型:MicrosoftOLEDBProviderforODBCDrivers(0x80040E14)[Microsoft][ODBCMicrosoftAccessD...
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] 语法错误 (操作符丢失) 在查询表达式 'ID =' 中。
/bbs0/delreply.asp, 第 8 行
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="conn/conn.asp" -->
<%
if Request.QueryString("ID")<>"" then
session("TopicID")=Request.QueryString("ID")
end if
set rstopic = Server.CreateObject("ADODB.Recordset")
sql_T = "SELECT * FROM Topic WHERE ID = "&session("TopicID")& " "(第9行)
rstopic.open sql_T,conn,1,3
set rsreply = Server.CreateObject("ADODB.Recordset")
sql_R= "SELECT * FROM Reply WHERE TopicID = "&session("TopicID")&" ORDER BY CreateTime DESC"
rsreply.open sql_R,conn,1,3
'自动计算人气指数
Hit= "UPDATE Topic SET Hit=hit+1 WHERE ID="&session("TopicID")& " "
conn.Execute(Hit)
if session("username")="游客" then
manager="游客"
else
set rsstatus = Server.CreateObject("ADODB.Recordset")
sql_S="SELECT UserName,Flag FROM DB_User WHERE userName = '"&session("UserName")&"'"
rsstatus.open sql_S,conn,1,3
session("topic")=rstopic("title")
manager=rsstatus("Flag")
end if
%>
<html>
请问高手怎么回事?
不是的是自动编号的,长整型,我刚开始也以为是,后来加了单引号就出现类型不匹配的问题了
急啊,高手请帮帮忙 展开
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] 语法错误 (操作符丢失) 在查询表达式 'ID =' 中。
/bbs0/delreply.asp, 第 8 行
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="conn/conn.asp" -->
<%
if Request.QueryString("ID")<>"" then
session("TopicID")=Request.QueryString("ID")
end if
set rstopic = Server.CreateObject("ADODB.Recordset")
sql_T = "SELECT * FROM Topic WHERE ID = "&session("TopicID")& " "(第9行)
rstopic.open sql_T,conn,1,3
set rsreply = Server.CreateObject("ADODB.Recordset")
sql_R= "SELECT * FROM Reply WHERE TopicID = "&session("TopicID")&" ORDER BY CreateTime DESC"
rsreply.open sql_R,conn,1,3
'自动计算人气指数
Hit= "UPDATE Topic SET Hit=hit+1 WHERE ID="&session("TopicID")& " "
conn.Execute(Hit)
if session("username")="游客" then
manager="游客"
else
set rsstatus = Server.CreateObject("ADODB.Recordset")
sql_S="SELECT UserName,Flag FROM DB_User WHERE userName = '"&session("UserName")&"'"
rsstatus.open sql_S,conn,1,3
session("topic")=rstopic("title")
manager=rsstatus("Flag")
end if
%>
<html>
请问高手怎么回事?
不是的是自动编号的,长整型,我刚开始也以为是,后来加了单引号就出现类型不匹配的问题了
急啊,高手请帮帮忙 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询