| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1052 人关注过本帖
标题:帮我看分析一下错在哪里啊!
只看楼主 加入收藏
she151
Rank: 1
等 级:新手上路
帖 子:38
专家分:0
注 册:2005-6-7
收藏
 问题点数:0 回复次数:17 
帮我看分析一下错在哪里啊!

<!-- #include file="../include/conn.asp"--> <% function makename(name) name=replace(name,":","") name=replace(name,"-","") name=replace(name," ","") makename=name end function session("filenum")=makename(now)&request.QueryString("DBase") %> <html>

<head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>西宁青旅信息管理系统--添加文章</title> <script language="javascript"> <!-- function CheckSubmit(theForm) {

if (theForm.txttitle.value == "") { alert("请输入新闻标题!"); theForm.txttitle.focus(); return (false); } // if (theForm.doc_html.value == "") // { // alert("请输入新闻内容!"); // return (false); // } if (theForm.doc_html.value !== "") { // return (true); document.form1.content.value=document.form1.doc_html.value } } //--> </script> <link rel="stylesheet" href="css/bb.css" type="text/css"> </head>

<body bgcolor="336699" text="#FFFFFF"> <form method="POST" action="admin_newssave.asp"onsubmit="return CheckSubmit(this)" name="form1"> <div align="center"><center> <table border="0" cellspacing="1" width="607" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0" bgcolor="#7C96B8"> <tr bgcolor="#6699CC"> <td width="100%" height="20"> <p align="center"><font color="#FFFFFF" class="t">:: <%=request.QueryString("DBase")%>内容添加</font> </td> </tr> <tr align="center"> <td width="100%" height="377" bgcolor="336699"> <table border="1" cellspacing="0" width="634" cellpadding="0" bgcolor="#6699CC" bordercolor="#000000" height="377"> <tr bgcolor="#6699CC"> <td width="21%" align="right" height="30" class="unnamed2" valign="middle" bgcolor="#6699CC"><font color="#FFFFFF">文章标题:</font></td> <td width="79%" height="30" bgcolor="#6699CC"> <font color="#FFFFFF"><span style='cursor:hand' title='缩短对话框' onClick='if (me.size>10)me.size=me.size-2'>-</span> <input name="txttitle" id=me type="TEXT" size=30 maxlength=100 style="background-color:ffffff;color:000000;border: 1 double"> <span style='cursor:hand' title='加长对话框' onClick='if (me.size<102)me.size=me.size+2'>+</span> </font></td> </tr> <tr> <td width="21%" align="right" valign="middle" class="unnamed2" bgcolor="#6699CC"><font color="#FFFFFF">上传时间:</font></td> <td width="79%" bgcolor="#6699CC"> <font color="#FFFFFF"> &nbsp; &nbsp;<input type="text" name="uptime" size="15" value="<%=FormatDateTime(now(),1)%>"> </font></td> </tr> <tr> <td width="21%" align="right" valign="top" class="unnamed2" bgcolor="#6699CC"><font color="#FFFFFF">上传图片:</font></td> <td width="79%" bgcolor="#6699CC" valign="middle"><iframe name="ad" frameborder=0 width=100% height=20 scrolling=no src="photo.asp"></iframe> </td> </tr> <tr> <td width="21%" height="309" align="right" valign="top" bgcolor="#6699CC" class="unnamed2"> <p align="left">&nbsp;</p> <p align="left"><font color="#FFFFFF">文章内容:</font></p> <p><font color="#FFFFFF">本编辑器支持</font></p> <p><font color="#FFFFFF">ubb,如果您不</font></p> <p><font color="#FFFFFF">熟悉ubb</font><font color="#FFFFFF">语法请</font></p> <p><font color="#FFFFFF">看</font><font color="#FFFFFF"><a href="help.asp">帮助</a>→</font></p> </td> <td width="79%" valign="top" bgcolor="#6699CC"><font color="#FFFFFF"> <object data=editor.htm type=text/x-scriptlet width=100% height=290 id=doc_html style="LEFT: 0px; TOP: 0px" VIEWASTEXT> <embed src="editor.htm" width="100%" height="290"></embed> </object> <input type="hidden" name="content" > <input type="hidden" name="DBase" value="<%=request.QueryString("DBase")%>"> <input type="hidden" name="leixing" value="<%=request.QueryString("leixing")%>"> </font></td> </tr> </table> </td> </tr> </table> </center></div><div align="center"><center><p> <input type="submit" value=" 添 加 " name="cmdok" class="unnamed5"> &nbsp; <input type="reset" value=" 清 除 " name="cmdcancel" class="unnamed5"> </p> </center></div> </form> </body> </html> 这是后面信息管理 表单添加代码

搜索更多相关主题的帖子: 管理系统 include javascript content function 
2005-06-17 15:07
she151
Rank: 1
等 级:新手上路
帖 子:38
专家分:0
注 册:2005-6-7
收藏
得分:0 

admin_newssave.asp <script> parent.main.location.reload(); </script>

<!-- #include file="../include/conn.asp"--> <!-- #include file="inc_char.asp"--> <!-- #include file="ifthen.asp"--> <!--#include file="tabledealwith.asp"--> <% dim title dim content dim sql dim rs dim articleid dim from dim mybout dim typeid dim mytype dim DBase DBase=request.Form("DBase") title=request.form("txttitle") leixing=request.Form("leixing") if isdate(request.form("uptime")) or request.form("uptime")="" then uptime=cdate(request.form("uptime")) else response.write "您输入的日期格式不对,请返回后仔细填写" response.end() end if zznews=request.form("zznews") mytype=request.form("typeid") '文章类别 '--------------------------------------------------- content=request.form("content") '-------------------------------------------------------------- set rs=nothing set rs=server.createobject("adodb.recordset") sql="select * from "&DBase rs.open sql,conn,3,3 rs.addnew rs("title")=title rs("content")=content&" " rs("filenum")=session("filenum") if leixing<>"" then rs("leixing")=request.Form("leixing") end if rs("time")=uptime rs.update rs.close set rs=nothing conn.close set conn=nothing %> <html> <head> <title>奔榕新闻管理系统--保存文章</title> <meta http-equiv=refresh content="2; url=admin_addnews.asp?DBase=<%=DBase%>&leixing=<%=leixing%>"> <link rel="stylesheet" href="css/bb.css" type="text/css"> </head> <body bgcolor="336699" text="#FFFFFF" topmargin="100" link="#000000" vlink="#CCCCCC"> <div align="center"> <table border="0" cellspacing="1" width="50%" bgcolor="#000000" bordercolorlight="#11B1FF" bordercolordark="#F0F8FF" cellpadding="0" align="center"> <tr bgcolor="#000066"> <td width="100%" height="20" bgcolor="#6699CC" align="left"> <font color="#FFFFFF">.:: 添加文章成功……</font></td> </tr> <tr> <td width="100%" bgcolor="#FFFFFF"> <p align="left"><br> 文件标题为: <%response.write title%> <font color="#000000">已添加文章成功,两秒钟后系统自动返回添加页面!</font></p> </td> </tr> </table> </div> </body> </html> 这是系统提交的代码。 错误提示

  • 错误类型: Microsoft JET Database Engine (0x80040E14) FROM 子句语法错误。 /yongtainew0617/zsjz/admin_newssave.asp, 第 37 行
  • 浏览器类型: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

  • 网页: POST 95 ??? /yongtainew0617/zsjz/admin_newssave.asp

  • POST Data: txttitle=dfdfdd&uptime=2005%C4%EA6%D4%C217%C8%D5&content=&DBase=&leixing=&cmdok=+%CC%ED+%BC%D3+
  • 2005-06-17 15:10
    she151
    Rank: 1
    等 级:新手上路
    帖 子:38
    专家分:0
    注 册:2005-6-7
    收藏
    得分:0 
    请各位大虾帮帮忙啊啊。急急急!!!!!有谁知道请加我QQ107125684。本人在此先说声谢谢!!!
    2005-06-17 15:12
    无根泉
    Rank: 2
    等 级:新手上路
    威 望:4
    帖 子:853
    专家分:0
    注 册:2004-11-4
    收藏
    得分:0 
    sql="select * from "&amp;DBase &amp;""

    我很菜,但我很努力!
    2005-06-17 15:35
    she151
    Rank: 1
    等 级:新手上路
    帖 子:38
    专家分:0
    注 册:2005-6-7
    收藏
    得分:0 
    这几句是错误的关键所在啊 看看帮我怎么改啊 set rs=server.createobject("adodb.recordset") sql="select * from "&DBase rs.open sql,conn,3,3
  • 错误类型: Microsoft JET Database Engine (0x80040E14) FROM 子句语法错误。 /yongtainew0617/zsjz/admin_newssave.asp, 第 37 行
  • 浏览器类型:
  • 2005-06-17 15:46
    she151
    Rank: 1
    等 级:新手上路
    帖 子:38
    专家分:0
    注 册:2005-6-7
    收藏
    得分:0 
    4 号楼不行啊!!!
    2005-06-17 15:51
    无根泉
    Rank: 2
    等 级:新手上路
    威 望:4
    帖 子:853
    专家分:0
    注 册:2004-11-4
    收藏
    得分:0 
    以下是引用无根泉在2005-6-17 15:35:31的发言: sql="select * from "&DBase&""
    先response.write DBase 看看是不是你要操作的数据表, 如果为空你再加上 if DBase="" then DBase="操作表" end if sql="select * from "&DBase&""

    我很菜,但我很努力!
    2005-06-17 16:25
    regedit
    Rank: 5Rank: 5
    等 级:贵宾
    威 望:19
    帖 子:950
    专家分:0
    注 册:2004-6-8
    收藏
    得分:0 
    sql="select * from '"&DBase&"'"

    最新作品:百货品牌商品资讯第一门户([url]http://www./[/url]),欢迎交流
    2005-06-17 17:40
    she151
    Rank: 1
    等 级:新手上路
    帖 子:38
    专家分:0
    注 册:2005-6-7
    收藏
    得分:0 
    谢了,但为什么读不出记录来!
    2005-06-18 07:48
    she151
    Rank: 1
    等 级:新手上路
    帖 子:38
    专家分:0
    注 册:2005-6-7
    收藏
    得分:0 

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>

    <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>硕果累累</title> <style type="text/css"> <!-- .unnamed1 { font-size: 12px; text-decoration: none; } --> </style> <% dim length1,length2 length1=16 length2=14 %> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } //--> </script> <link href="../css.css" rel="stylesheet" type="text/css"> </head> <!--#include file="../include/strCnn.asp"--> <% dim leixing leixing=cstr(request.QueryString("leixing"))

    set rs=server.CreateObject("adodb.recordset") rs.open "select * from yskj where leixing='"&leixing&"'order by id desc",objcnn,3,3 if request.Form("Submit")="删除" then while rs.eof=false if request.Form(cstr(rs("id")))="del" then rs.delete end if rs.movenext wend rs.close rs.open "select * from yskj where leixing='"&leixing&"' order by id desc",objcnn,3,3 end if %> <body bgcolor="D6DFF7"> <div align="center"><b><%=request.QueryString("leixing")%>信息管理</b> </div> <table width="100%" border="1" align="center" bordercolorlight="#006600" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" class="unnamed1"> <form action="modify.asp?leixing=<%=request.QueryString("leixing")%>" method="post" name="form1"> <tr> <td height="18"><div align="center">标题</div> <div align="center"></div> <div align="center"></div> <div align="center"></div></td> <td><div align="center">发布时间</div></td> <td><div align="center">删除</div></td> <td><div align="center">修改</div></td> </tr> <% If Not rs.Bof And Not rs.Eof Then if Request.QueryString("page_no")="" then page_no=1 else page_no=Cint(Request.QueryString ("page_no")) end if page_size=10 rs.PageSize=page_size page_total=rs.PageCount rs.AbsolutePage=page_no Dim I I=page_size dim title,shuoming While Not rs.Eof And I>0 I=I-1 title=cstr(rs("title")) leixing=cstr(rs("leixing")) if len(title)>length1 then title=left(title,length2)&"..." end if if len(leixing)>length1 then leixing=left(leixing,length2)&"..." end if %> <tr> <td height="18"><a href="yskjshow.asp?id=<%=rs("id")%>" target="_blank" ><%=title%></a> <div align="left"></div></td> <td width="116"><div align="center"><%=rs("time")%></div></td> <td width="96"><div align="center"> <input name="<%=rs("id")%>" type="checkbox" id="<%=rs("id")%>" value="del"> </div></td> <td width="112"><div align="center"><a href="../zsjz/edit_addnews.asp?id=<%=rs("id")%>&leixing=<%=rs("leixing")%>&DBase=yskj" target="middle" class="unnamed1">修改</a></div></td> </tr> <% rs.movenext wend end if %> <tr> <td height="18" colspan="2"> <% response.Write("页数:"&page_total&" "&page_no &"/"&page_total&" 每页有"&page_size&"个文件,文件总数:"&rs.recordcount&" ") if page_no>=4 and page_no+4<page_total then response.Write(" ......") for i=page_no-3 to page_no+4 if i=page_no then response.Write i &" " else Response.Write "<samp class='unnamed1'><a href='modify.asp?page_no=" & I & " ' >" & I & "</a></samp>&nbsp" end if next response.Write(" ......") elseif page_no>=4 and page_no+4>=page_total then response.Write(" ......") for i=page_no-3 to page_total if i=page_no then response.Write i &" " else Response.Write "<samp class='unnamed1'><a href='modify.asp?page_no=" & I & " ' >" & I & "</a></samp>&nbsp" end if next elseif page_no<4 then dim m if page_total<5 then m=page_total else m=5 end if for i=1 to m if i=page_no then response.Write i &" " else Response.Write "<samp class='unnamed1'><a href='modify.asp?page_no=" & I & " ' >" & I & "</a></samp>&nbsp" end if next end if %> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 第 <select name="menu1" onChange="MM_jumpMenu('self',this,0)"> <%for j=1 to page_total%> <option value="modify.asp?page_no=<%=j%>" <%if page_no=j then%>selected<%end if%>><%=j%></option> <%next%> </select> 页 </td> <td height="18"> <div align="center"> <input type="submit" name="Submit" value="删除"> </div></td> <td height="18"><div align="center"><a href="../zsjz/admin_addnews.asp?DBase=yskj&leixing=<%=request.QueryString("leixing")%>" target="middle">&lt;&lt;发表信息&gt;&gt;</a></div></td> </tr> </form> </table> </body> </html> 都是为空值啊

    2005-06-18 07:48
    快速回复:帮我看分析一下错在哪里啊!
    数据加载中...
     
       



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

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