[Microsoft][ODBC SQL Server Driver][SQL Server] '=' 附近有语法错误
<%@ language="vbscript" %><%
dim author,ip_addr,theme,pic_path,content,id
dim cnn,sSQL
author=trim(Request.Form("txtAuthor"))
ip_addr=Request.ServerVariables("REMOTE_ADDR")
theme=trim(Request.Form("txtTheme"))
pic_path=Request.Form("optPic")
content=trim(Request.Form("txtContent"))
id=Request.Form("id")
if author=" " or theme=" " or content=" " then
Server.Transfer="replyTheme.asp"
end if
%>
<html>
<head>
<title>回复已提交</title>
</head>
<body>
<! --#include virtual="/adovbs.inc -->
<%
set cnn=Server.CreateObject("ADODB.Connection")
cnn.ConnectionString="driver={SQL Server};server=ME;uid=sa;pwd=;database=test"
cnn.Open
sSQL="update articles set reply_times=reply_times+1 where art_id= " & id
cnn.Execute sSQL, , adCmdText
sSQL="insert replies(author,ip_addr,theme,pic_path,content,re_id)"
sSQL=sSQL & "values('" & author & "','" & ipaddr & "','"
sSQL=sSQL & theme & "','"&"images/" & pic_path & "','" &conten &"',id)"
cnn.Execute sSQL, ,adCmdText
%>
<p><b>回复提交成功!</b></p>
<p>[<a href="forum.asp">返回论坛首页</a>]</p>
</body>
</html>
调试时,红色的那行代码老是报这样的错误:
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]第 1 行: '=' 附近有语法错误。
为什么呀?