| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1648 人关注过本帖
标题:求助:Microsoft VBScript 编译器错误 '800a0400' 缺少语句
只看楼主 加入收藏
中学时代
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-11-20
收藏
 问题点数:0 回复次数:0 
求助:Microsoft VBScript 编译器错误 '800a0400' 缺少语句

提示信息如下:

Microsoft VBScript 编译器错误 '800a0400'

缺少语句

\wwwroot\admin_news\addnews.asp, line 64

代码如下:

<!--#include file="../config.asp" -->
<!--#include file="../CONN.asp" -->
<!--#include file="../inc_Function.asp" -->
<!--#include file="../inc_ISlogin.asp" -->

<% openadmin
dim rs,sql
set rs=server.createobject("adodb.recordset")
mimageNum = 0
action = "addnew"
newsId = Trim(Request.QueryString("newsId"))

if isNumeric(newsId)=false or newsId="" then
newsId=0
action = "addnew"
end if

set rsp=Server.CreateObject("ADODB.RecordSet")
sqlp = "select * FROM news where id="&newsId
rsp.Open sqlp,conn,1,3
if rsp.RecordCount=1 then
action = "modify"
mcataid=rsp("cataid")
mtitle=rsp("title")
mcontent=rsp("content")
mfrom=rsp("from")
mspecial=rsp("special")
mpermission=rsp("permission")
if mspecial ="True" then
mspecial1 = "checked"
else
mspecial1 = ""
end if

else
action = "addnew"
mspecial1 = ""
newsId = 0
end if
rsp.Close
set rsp=nothing

sub produceForm()

mcataid=trim(request.form("cataid"))
mtitle=trim(request.form("title"))
mfrom=trim(request.form("from"))
mspecial=trim(request.form("special"))
mpermission=trim(request.form("permission"))
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"))

sqlq = "select * from news where id="&Trim(Request.Form("newsId"))
set rsq = Server.CreateObject("ADODB.RecordSet")
rsq.Open sqlq,conn,1,3
if Trim(Request.Form("action"))="modify" then
if rsq.RecordCount = 1 then
//修改
rsq("cataid") = mcataid
rsq("title") = mtitle
rsq("content") = mcontent
rsq("from") = mfrom

if mimageNum<>"" then rsq("imageNum") = mimageNum
if firstImageName<>"" then rsq("firstImageName") = firstImageName
if mspecial<>"" then rsq("special") = mspecial
if mpermission<>"" then rsq("permission") = mpermission

rsq("addtime") = Now()

rsq.Update
end if
Response.Write("<Script Language='Javascript'>")
Response.Write("alert('文章已经修改成功!');")
Response.Write("</Script>")
Response.Write "<script language=javascript>"&_
"history.go(-2);"&_
"</script>"
else
rsq.AddNew
rsq("cataid") = mcataid
rsq("title") = mtitle
rsq("content") = mcontent
rsq("from") = mfrom

if mimageNum<>"" then rsq("imageNum") = mimageNum
if firstImageName<>"" then rsq("firstImageName") = firstImageName

rsq("addtime") = Now()
rsq("hits") = 1
if mspecial<>"" then rsq("special") = mspecial
if mpermission<>"" then rsq("permission") = mpermission

rsq.update
rsq("sortid")=rsq("id")
rsq.update

Response.Write("<Script Language='Javascript'>")
Response.Write("alert('文章已经成功保存了!');")
Response.Write("</Script>")

end if
rsq.Close
set rsq = nothing
end sub

if Trim(Request.Form("action"))<>"" then
call produceForm()
end if

%>
<html>
<head>
<title>增加文章</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language=javascript>
<!--

function CContext()
{}
var g_cContext = new CContext();
g_cContext.StaticContentServer = '';


function saveIt()
{
document.pub_topic.cnWords.value = document.frames.cnEditBox.getHTML(true);
document.pub_topic.imageNum.value = document.frames.cnEditBox.document.all("editImageNum").value;
document.pub_topic.editFirstImageName.value = document.frames.cnEditBox.document.all("editFirstImageName").value;

if (document.pub_topic.cataid.value=="")
{
alert('请选择文章的类别!');
document.pub_topic.cataid.focus();
return false;
}

if (document.pub_topic.title.value=="")
{
alert('请输入文章的标题!');
document.pub_topic.title.focus();
return false;
}
document.pub_topic.submit();
}
//-->
</script>
<link href="../css/Admin_style.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
<!--#include file="../admin/inc_admin_top.asp" -->
<br>
<table width="99%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>

<td>&nbsp;&nbsp;&nbsp;<font color="#FF0000">发布/修改文章</font>
<form name="pub_topic" method="post" action="addnews.asp?action=addnew" ID="pub_topic">
<table width="98%" border="0" align="center" cellspacing="2" cellpadding="2">
<tr>
<td width="13%">
<div align="right">文章类别:</div>
</td>
<td width="87%">
<select name="cataid" size="1" style="background-color:#ECF3FF;">
<option value=''>--请选择--</option>
<%
set rs=server.CreateObject("adodb.recordset")
sql="Select * from newscata order by rootid"
rs.Open sql,conn,1,3

do while not rs.EOF
tempcataStr="<option value='"&trim(rs("id"))&"'"

if rs("id") = mcataid then tempcataStr = tempcataStr&" selected "

tempcataStr = tempcataStr&">"
tempcataStr = tempcataStr&" | |"

for i=1 to rs("level")-1
tempcataStr = tempcataStr&" |"
next

tempcataStr = tempcataStr&"_"&trim(rs("title"))&"</option>"

Response.Write tempcataStr

rs.MoveNext
loop

rs.Close()
set rs=nothing
%>
</select>
</td>
</tr>
<tr>
<td width="13%">
<div align="right">文章标题:</div>
</td>
<td width="87%">
<input type="text" name="title" size="64" class="button1" value="<%=mtitle%>">
</td>
</tr>
<tr>
<td valign="top" width="13%">
<div align="right">文章内容:</div>
</td>
<td width="87%"> <IFRAME STYLE="border: none" NAME=cnEditBox src="EditBox.asp?newsId=<%=newsId%>" WIDTH=500 HEIGHT=400></IFRAME>
</td>
</tr>
<tr>
<td width="13%">
<div align="right">文章来源:</div>
</td>
<td width="87%">
<input type="text" name="from" value="<%=mfrom%>" size="32" class="button1">
<input name="textfield" type="text" value="诺亚方舟个人站 未知">
</td>
</tr>
<tr>
<td width="13%">
<div align="right">特别文章:</div>
</td>
<td width="87%">
<input type="checkbox" name="special" value="true" <%=mspecial1%>>
是否特别文章,如果是请打钩</td>
</tr>
<%if news_permission ="yes" then%>
<tr>
<td width="13%">
<div align="right">阅读权限:</div>
</td>
<td width="87%">
<select name="permission" size="1" style="background-color:#ECF3FF;">
<option value='0' selected>--允许所有人查看--</option>
<%
set rsm=server.CreateObject("adodb.recordset")
sqlm="Select * from membercata order by id"
rsm.Open sqlm,conn,1,3

do while not rsm.EOF
tempmembercata="<option value='"&trim(rsm("level"))&"'"
if rsm("level") = mpermission then tempmembercata = tempmembercata&" selected "
tempmembercata = tempmembercata&">"
tempmembercata = tempmembercata&trim(rsm("title"))&"</option>"
Response.Write tempmembercata

rsm.MoveNext
loop

rsm.Close()
set rsm=nothing
%>
</select>
</td>
</tr>
<%end if%>
<tr>
<td width="13%">
<div align="right"><font color="#FF0000">注意:</font></div>
</td>
<td width="87%"><font color="#FF0000">以上文章标题和文章内容必须填写,其他可以不填!</font></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input type="button" name="post" value=" 发 表 " onClick="return saveIt();" ID="post" class="button2">
<input type="hidden" name="newsId" value="<%=newsId%>">
<input type="hidden" name="action" value="<%=action%>">
<input type="reset" name="reset" value=" 重 置 " class="button2">
<!--获取EditBox的内容-->
<input name=cnWords type=hidden ID="cnWords" value="">
<input name=imageNum type=hidden ID="imageNum" value="<%=mImageNum%>">
<input name=editFirstImageName type=hidden ID="editFirstImageName" value="">
<!--获取EditBox的内容-->
</td>
</tr>
</table>
</form> </td>
</tr>
</table>
</body>
</html>

搜索更多相关主题的帖子: Microsoft VBScript 语句 编译 
2007-11-20 19:26
快速回复:求助:Microsoft VBScript 编译器错误 '800a0400' 缺少语句
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.035518 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved