是个发布新闻的后台代码,只能够删除文章,不能添加文章,这是怎么回事啊?
本人有急用,但是又太菜了,求各位大哥不吝指点 多谢。qq:329011852
错误为:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]行中有错误
/asheng/admin/addinfo_ok.asp, 第 27 行
addinfo_ok.asp的代码为:
<!--#include file="adminconn.inc"-->
<%
title=request("title")
BigClassName=request("BigClassName")
SmallClassName=request("SmallClassName")
mContent = trim(Request.form("cnWords"))
mContent = Replace(mContent,"<script","<sscript")
mContent = Replace(mContent,"/script>","/scripts>")
mContent = Replace(mContent,"/script >","/scripts>")
mimageNum = Request.form("imageNum")
firstImageName = trim(Request.form("editFirstImageName"))
user=request("user")
ok=request("ok")
set rs=server.createobject("adodb.recordset")
sql="select * from NEWS where (id is null)"
rs.open sql,conn,3,3
rs.addnew
rs("title")=title
rs("content")=mcontent
rs("user")=user
rs("BigClassName")=BigClassName
rs("SmallClassName")=SmallClassName
if ok<>"" then rs("ok") = ok
if mimageNum<>"" then rs("imageNum") = mimageNum
if firstImageName<>"" then rs("firstImageName") = firstImageName
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "<script language='javascript'>" & chr(13)
response.write "alert('新闻提交成功!');" & Chr(13)
response.write "window.document.location.href='admin_info.asp';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
%>