| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1371 人关注过本帖
标题:紧急求助
只看楼主 加入收藏
孤星
Rank: 1
等 级:新手上路
帖 子:127
专家分:0
注 册:2004-6-30
收藏
 问题点数:0 回复次数:13 
紧急求助

主页面:

<!--#include file="conn.asp"--> <!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" lang="gb2312"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta http-equiv="Content-Language" content="gb2312" /> <link rel="stylesheet" rev="stylesheet" href="css/bg.css" type="text/css" media="all" /> <title>海泰经贸有限公司 </title> <link href="css/indexlayout.css" rel="stylesheet" type="text/css" /> <link href="css/menu.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="content"><div id="top2"><img src="image/top.gif" alt="top" width="760" height="124" /></div> <div class="ml_index" id="submenu"> <ul> <li id="one"><a title="首页" href="main.htm">首页</a></li> <li id="two"><a title="关于海泰" href="about.htm">关于海泰</a></li> <li id="three"><a title="产品展示" href="product.htm">产品展示</a></li> <li id="four"><a title="新闻中心" href="news.htm">新闻中心</a></li> <li id="five"><a title="客户服务" href="ser.htm">客户服务</a></li> <li id="six"><a title="客户反馈" href="feedback.htm">客户反馈</a></li> <li id="seven"><a title="心情驿站" href="rest.htm">心情驿站</a></li> <li id="eight"><a title="网站地图" href="sitmap.htm">网站地图</a></li> </ul> </div> <div><img src="image/flasha.jpg" width="760" height="240" /></div><div id="d2"> <div id="d-2-1">海泰网站测试中<br /> 海泰网站测试中 <br /> 海泰网站测试中<br /> 海泰网站测试中<br /> 海泰网站测试中</div> <% sql="select top 6 * from news where cateid='8' order by id DESC" set rs=server.createobject("adodb.recordset") rs.open sql,conn,3,3 if rs.eof then else do while not rs.eof%> <img src="wen.gif" width="9" height="7"> <%if len(rs("title"))>10 then title=left(rs("title"),10) %> <a href='javascript:opennew(<%=rs("cateid")%>)'> <%response.write " <font size='2'>" & title & "</font>"%>……</a><font size="2"> <font color="#cccccc">[<%=rs("addtime")%>]</font> <%else%> <a href='javascript:opennew(<%=rs("cateid")%>)'><%=rs("title")%></a> <font color="#cccccc">[<%=rs("addtime")%>]</font> <%end if%> </font> <br> <%rs.movenext loop end if rs.close %> </div> <div id="d3"><a href="sitmap.htm">网站地图</a> <a href="lianxi.htm">联系我们</a> </div> </div> </body> </html>

conn.asp:

<% dim conn dim connstr 'on error resume next call conn_init()

sub conn_init() 'on error resume next

connstr = "DBQ=" + server.mappath("news.mdb") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" set conn=server.createobject("ADODB.CONNECTION") if err.number<>0 then err.clear set conn=nothing response.write "数据库连接出错!" Response.End else 'response.write connstr conn.open connstr if err then err.clear set conn=nothing response.write "数据库连接出错!" Response.End end if end if end sub sub endConnection() conn.close set conn=nothing end sub %>

报错:

Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e07'

[Microsoft][ODBC Microsoft Access Driver] 标准表达式中数据类型不匹配。

/ht/main1.asp,行35

各位大虾,紧急求助。

搜索更多相关主题的帖子: html blank content include PUBLIC 
2004-07-02 10:13
belin2000
Rank: 3Rank: 3
等 级:论坛游侠
威 望:5
帖 子:975
专家分:194
注 册:2004-6-2
收藏
得分:0 

指出出错的行,用其他颜色!


59ita点com(我就爱TA)
2004-07-02 11:55
好学
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:622
专家分:318
注 册:2004-5-4
收藏
得分:0 
如果不是保密代码传上来大家帮你调试吧
2004-07-02 13:02
jzh2004
Rank: 1
等 级:新手上路
帖 子:341
专家分:0
注 册:2004-4-30
收藏
得分:0 

问个问题,

如果我要包含别的网页是不是就用这个:<!--#include file="conn.asp"--> 这个放在网页的什么位置?

是不是必须发布后才能看到,我用frontpage放在head里就看不到,说包含发布或保存后才能看到的信息


我的主页 http://www.
2004-07-02 14:47
jzh2004
Rank: 1
等 级:新手上路
帖 子:341
专家分:0
注 册:2004-4-30
收藏
得分:0 

我的网页是htm后缀


我的主页 http://www.
2004-07-02 14:49
Rank: 1
等 级:新手上路
帖 子:98
专家分:0
注 册:2004-3-30
收藏
得分:0 

静态网页不能用<!--#include file=""--> 可以用JS调用


在风中迷茫的男孩
2004-07-02 15:52
烽火
Rank: 1
等 级:新手上路
帖 子:22
专家分:0
注 册:2004-6-27
收藏
得分:0 

又没注释,又没将出错的那一行标出。 这要我们怎么跟你指出错误啊!


首先是爱情让人忘记时间,然后是时间让人忘记爱情!!你信不信...想想再回答!
2004-07-02 16:57
griefforyou
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:3336
专家分:0
注 册:2004-4-15
收藏
得分:0 

sql="select top 6 * from news where cateid='8' order by id DESC"

改成

sql="select top 6 * from news where cateid=8 order by id DESC" '去掉 8两边的单引号

Access数据库的SQL语句要注意一下数据类型。


天津网站建设 http://www./
2004-07-02 17:09
griefforyou
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:3336
专家分:0
注 册:2004-4-15
收藏
得分:0 
以下是引用jzh2004在2004-07-02 14:49:10的发言:

我的网页是htm后缀

htm文件不能使用include包含其它文件


天津网站建设 http://www./
2004-07-02 17:12
jzh2004
Rank: 1
等 级:新手上路
帖 子:341
专家分:0
注 册:2004-4-30
收藏
得分:0 

那我把后缀改成asp的了,include语句放在哪里啊?


我的主页 http://www.
2004-07-02 19:46
快速回复:紧急求助
数据加载中...
 
   



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

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