错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] 语法错误 (操作符丢失) 在查询表达式 'articleid=' 中。
/1111/addsave.asp, 第 118 行
请各位高手帮忙谢谢!!
代码如下:
<!--#include file="conn.asp"-->
<!--#include file="char.asp"-->
<%
    dim rs,sql
    dim wenzhangbianhao
    dim title
    dim content
    dim articleid
    dim classid,Nclassid
    dim Nkey
    dim englishtitle
    dim englishkey
    dim zuozhe
    dim zuozhe_dangwei
    dim zuozhe_dizhi
    dim zuozhe_youbian
    dim zuozhe_phone
    dim zuozhe_email
    dim zuozhe_jieshao
    dim errmsg
    dim founderr
    founderr=false
    if trim(request.form("txttitle"))="" then
          founderr=true
          errmsg="<li>文章标题不能为空</li>"
    end if
    if trim(request.form("txtcontent"))="" then
          founderr=true
          errmsg=errmsg+"<li>文章内容不能为空</li>"
    end if
    if trim(request.form("key"))="" then
          founderr=true
          errmsg=errmsg+"<li>请输入文章关键字</li>"
    end if
    if founderr=false then
        wenzhangbianhao=htmlencode(request.form("wenzhangbianhao"))
        title=htmlencode(request.form("txttitle"))
        Nkey=htmlencode(trim(request.form("key")))
        englishkey=htmlencode(request.form("englishkey"))
        zuozhe_pinyin=htmlencode(request.form("zuozhe_pinyin"))
        zuozhe_dizhi=htmlencode(request.form("zuozhe_dizhi"))
        zuozhe_youbian=htmlencode(request.form("zuozhe_youbian"))
        zuozhe_phone=htmlencode(request.form("zuozhe_phone"))
        zuozhe_email=htmlencode(request.form("zuozhe_email"))
        zuozhe_jieshao=htmlencode(request.form("zuozhe_jieshao"))
        classid=request.form("classid")
        Nclassid=request.form("Nclassid")
        if request("htmlable")="yes" then
        content=htmlencode2(request("txtcontent"))
        else
        content=ubbcode(request.form("txtcontent"))
        end if
    set rs=server.createobject("adodb.recordset")
    if request("action")="add" then
        call newsoft()
    else if request("action")="edit" then
        call editsoft()
    else
        founderr=true
        errmsg=errmsg+"<li>没有选定参数</li>"
    end if
    end if
sub newsoft()
    sql="select * from article1 where (articleid is null)" 
    rs.open sql,conn,1,3
    rs.addnew
    rs("wenzhangbianhao")=wenzhangbianhao
    rs("title")=title
    rs("englishtitle")=englishtitle
    rs("englishkey")=englishkey
    rs("content")=content
    rs("Nclassid")=Nclassid
    rs("classid")=classid
    rs("Nkey")=Nkey
    rs("hits")=0
    if request.form("zuozhe")<>"" then
        rs("zuozhe")=trim(request.form("zuozhe"))
    end if
    if request.form("zuozhe_dangwei")<>"" then
        rs("zuozhe_dangwei")=trim(request.form("zuozhe_dangwei"))
    end if
    rs("zuozhe_dizhi")=zuozhe_dizhi
    rs("zuozhe_youbian")=zuozhe_youbian
    rs("zuozhe_phone")=zuozhe_phone
    rs("zuozhe_email")=zuozhe_email
    rs("zuozhe_jieshao")=zuozhe_jieshao
    rs("dateandtime")=date()
    rs.update
end sub
sub editsoft()
    sql="select * from article1 where articleid="&request("id")
    rs.open sql,conn,1,3
    rs("wenzhangbianhao")=wenzhangbianhao
    rs("title")=title
    rs("englishtitle")=englishtitle
    rs("englishkey")=englishkey
    rs("content")=content
    rs("Nclassid")=Nclassid
    rs("classid")=classid
    rs("Nkey")=Nkey
    if request.form("zuozhe")<>"" then
        rs("zuozhe")=trim(request.form("zuozhe"))
    end if
    if request.form("zuozhe_dangwei")<>"" then
        rs("zuozhe_dangwei")=trim(request.form("zuozhe_dangwei"))
    end if
    rs("zuozhe_dizhi")=zuozhe_dizhi
    rs("zuozhe_youbian")=zuozhe_youbian
    rs("zuozhe_phone")=zuozhe_phone
    rs("zuozhe_email")=zuozhe_email
    rs("zuozhe_jieshao")=zuozhe_jieshao
    rs.update
end sub
    set rs=server.createobject("adodb.recordset")
    sql="select * from article1 where articleid="&request("id")   (第118行)
    rs.open sql,conn,1,3
    rs.addnew
 %>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="style.css">
<%if request("action")="add" then%>
<meta http-equiv="refresh" content="3;url=addsave.asp">
<%end if%>
</head>
<body>
<div align="center"><center>
<br><br>
<table class="border" align=center width="50%" border="0" cellpadding="4" cellspacing="0" bordercolor="#999999">
  <tr align=center>
    <td width="100%" class="title"  height="20"><b>
<%if request("action")="add" then%>登记<%else%>修改<%end if%>稿件成功</b></td>
  </tr>
  <tr>
    <td class="tdbg"><p align="left"><br>
        文章编号为:<%response.write "article1"&articleid%><br>
        文章标题为:<%response.write title%></p>
    <script language="VBScript">
Sub GoForward()
history.go(1)
end sub
Sub GoBack()
history.go(-1)
end sub
</script>
<form name=form1>
<DIV ALIGN="CENTER">
<input type="button" name="后退" value="返回" onClick="GoBack">  
</DIV>
</form>
</td>
  </tr>
</table>
</center></div>
<%
else 
    Error()
end if
%>
</body>
</html>
<%
sub Error()
    response.write "   <html><head><link rel='stylesheet' href='style.css'></head><body>"
        response.write "   <br><br><br>"
        response.write "    <table align='center' width='300' border='0' cellpadding='4' cellspacing='0' class='border'>"
        response.write "      <tr > "
        response.write "        <td class='title' colspan='2' height='15'> "
        response.write "          <div align='center'>由于以下的原因不能保存数据!</div>"
        response.write "        </td>"
        response.write "      </tr>"
        response.write "      <tr> "
        response.write "        <td align=center class='tdbg' colspan='2' height='23'> "
        response.write "          <br>"
        response.write errmsg& " <br><br>"
        response.write "        <a href='javascript:onclick=history.go(-1)'>返回</a>"        
        response.write "        <br><br></td>"
        response.write "      </tr>   </table></body></html>" 
end sub
%>



 
											





 
	    

 
	