日期:2014-05-17  浏览次数:20853 次

接收编辑器fckeditor的content失败,同时,写入数据库也不行!!!
有2个错误,一个是接收编辑中的内容已经大于10位了,但是它还是提示“内容不得少于10位”
还有一个就是写入数据库也不行,说是少了一个,对了下,没有少啊,错误提示“Microsoft JET Database Engine (0x80040E10)至少一个参数没有被指定值。”
HTML code

<%@codepage = 936%>
<!--上面表示采用简体中文显示-->
<!--#include file="../Include/function.asp"-->
<!--#include file="fckeditor/fckeditor.asp"-->
<!--#include file="../Data/conn.asp"-->
<%
    response.charset = "GBK"
    if session("Admin") = "" then
        call sussLoctionHref("非法登录","admin_login.asp")
    end if
    '接收添加的内容
    if request.form("send") = "添加内容" then
        dim addsql,sort,title,top,rmp,pic,bold,color,tag,keyword,info,name
        sort = request.form("sort")
        title = request.form("title")
        top = request.form("top")
        rmp = request.form("rmp")
        pic = request.form("pic")
        bold = request.form("bold")
        color =  request.form("color")
        tag =  request.form("tag")
        keyword =  request.form("keyword")
        info =  request.form("info")
        name =  request.form("name")
        content =  request.form("content")
        
        '开始使用VBScript对字段进行验证
        
        '标题=>不能为空并且不能少于4位,不能大于100位
        if len(title) < 4 or len(title) > 100 then
            call errorHistoryBack("标题不小于4位,或者大于100位")
        end if
        
        '发布者不能为空
        if name = "" then
            call errorHistoryBack("发布人不得为空")
        end if
        
        '内容简介
        if len(info) < 10 or len(info) > 200 then
            call errorHistoryBack("内容简介不得小于10位,大于200位")
        end if 
        
        '主要内容
        if len(content) < 10 then
            call errorHistoryBack("内容不得少于10位")
        end if
        
        
        if top = "" then 
            top =0
        end if
        
        if rmp = "" then 
            rmp =0
        end if
        
        if pic =  "" then
            pic = 0
        end if
        
        if bold = "" then
            bold = 0
        end if
        
        '新增数据,发布成功后跳转到内容管理页面,[这里是错误的,写入不了]
        addsql = "Insert into Article (cms_Sort,cms_Title,cms_Top,cms_Rmp,cms_Pic,cms_Bold,cms_Color,cms_Tag,cms_Keyword,cms_Name,cms_Info,cms_Content,cms_Date) values ("&sort&",'"&title&"',"&top&","&rmp&","&pic&","&bold&",'"&color&"','"&tag&"','"&keyword&"','"&name&"','"&info&"','"&content&"',now())"
        conn.execute(addsql)
        call close_conn
        call sussLoctionHref("内容新增成功","admin_artice.asp")
        
    end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>菲戈--内容发布</title>
<link rel="stylesheet" type="text/css" href="css/login.css" />
<script type="text/javascript" src="js/content.js"></script>
</head>
<body>

<form name="add" id="articleadd" method="post" action="admin_article_add.asp">
    <dl>
        <dt>欢迎您来发布内容</dt>
        <dd>文章类别:
            <select name="sort"&