关于,页面无法显示问题,小弟请教

icemao520 2009-08-27 12:50:13
Microsoft OLE DB Provider for ODBC Drivers 错误'80040e14'
[Microsoft][SOL Server]过程'Files'的请求失败,因为'Files'是表对象。
/inc/editdoc.asp,行31

以下是代码,帮忙看下哪里有错要修改,谢谢各位

<%@ Language=VBScript %>
<!--#include file="conn.asp"-->


<script>
if(window.screen.availWidth>1000){
k1=window.screen.availWidth
g1=window.screen.availHeight
}else{
k1=window.screen.availWidth
g1=window.screen.availHeight
}
window.moveTo(0,0);
window.resizeTo(k1,g1);
self.focus();

</script>

<HTML>
<HEAD>
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<SCRIPT LANGUAGE="JavaScript" src="ntkoocx.js"> </SCRIPT>
<SCRIPT LANGUAGE="JavaScript" src="word.js"> </SCRIPT>
<TITLE>渝中区财政局文档管理系统 </TITLE>
</HEAD>
<%
dim docid
docid = Request.querystring("id")

Set fileRS = Server.CreateObject("ADODB.Recordset")
fileRS.Open "files", conn, adOpenStatic, adLockReadOnly 'static,read only
fileRS.Find "fid=" & docid
if not fileRS.EOF then
filename = fileRS("fname")
htmlfile = Mid(filename,1,instrrev(filename,".")) & "html"
title = fileRS("title")
SQL = "SELECT fid FROM htmls WHERE fid = " & docid
set htmlRS = conn.Execute( SQL )
if not htmlRS.EOF then
htmlid = htmlRS("fid")
end if
htmlRS.Close
set htmlRS = Nothing
end if
fileRS.Close
Set fileRs= Nothing
%>
<BODY onLoad='javascript:TANGER_OCX_OpenDoc(false," <% = docid %>");TANGER_OCX_SetMarkModify(false);TANGER_OCX_ShowRevisions(true);'>
<center>
<FORM id="myForm" METHOD="POST" ENCTYPE="multipart/form-data" ACTION="uploadedit.asp">
<TABLE BORDER=0 width = 100%>

<tr>
<td>
<input id="docid" name="docid" style="display:none"MAXLENGTH=50 size=50 value=" <% = docid %>">
</td>
<td> <input id="filename" name="filename" style="display:none"MAXLENGTH=50 size=50 value=" <% = filename %>">
</td>
</tr>

<tr>
<td> <strong>标题: </strong> </td>
<td>
<table border=0 cellpadding="0" cellspacing="0" width="100%"> <tr> <td>
<input id="title" name="title" MAXLENGTH=50 size=50 value=" <% = title %>">

<% if session("mem_id")="10190" or session("mem_id")="10191" or session("mem_id")="10192" or session("mem_id")="10193" then%>
<button class="op" onclick="TANGER_OCX_SaveEditToServer();">保存文档 </button>
<% end if%>
</td> <td align="right">
<% if session("mem_id")="10190" or session("mem_id")="10191" or session("mem_id")="10192" then%>
<button class="op" onclick="DoHandSign()">领导批注 </button>
<% end if %>

</td> </tr> </table>
</td>
</tr>


</TABLE>

<style>
button.op{
width:90px;
background-color:#9DC2DB;
border:1px #EEEEEE solid;
cursor: hand;
}
</style>


<object id="TANGER_OCX" classid="clsid:C9BC4DFF-4248-4a3c-8A49-63A7D317F404" codebase="officecontrol.cab#version=3,0,0,4" width="100%" height="100%">
<param name="BorderStyle" value="1">
<param name="BorderColor" value="14402205">
<param name="TitlebarColor" value="14402205">
<param name="TitlebarTextColor" value="0">
<param name="Caption" value="重庆天海文档控件">
<param name="IsShowToolMenu" value="-1">
<param name="IsNoCopy" value="-1">
<SPAN STYLE="color:red">不能装载文档控件。请在检查浏览器的选项中检查浏览器的安全设置。 </SPAN>
</object>
<!-- 以下函数相应控件的两个事件:OnDocumentClosed,和OnDocumentOpened -->
<script language="JScript" for=TANGER_OCX event="OnDocumentClosed()">
TANGER_OCX_OnDocumentClosed();
</script>
<script language="JScript" for=TANGER_OCX event="OnDocumentOpened(TANGER_OCX_str,TANGER_OCX_obj)">
TANGER_OCX_OnDocumentOpened(TANGER_OCX_str,TANGER_OCX_obj);
</script>

</FORM>
</center>
</BODY>
</HTML>


帮忙看看
...全文
91 点赞 收藏 7
写回复
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
icemao520 2009-08-28
谢谢大家,我可以结帖了
回复
mahui19780126 2009-08-27
连接数据库错误,看看连接代码。自己上百度搜一下。
回复
syjeffdyg 2009-08-27
同意楼上,虽然可以直接rs.open 表名
但估计是files为关键字吧
fileRS.Open " select * from [files] ", conn, adOpenStatic, adLockReadOnly 'static,read only
[files]用方括号括起来就行腊八
回复
aemyang1987 2009-08-27
[Quote=引用 2 楼 cosler 的回复:]
fileRS.Open "files", conn, adOpenStatic, adLockReadOnly 'static,read only


files 改成一个SQL语句

fileRS.Open " select * from [files] ", conn, adOpenStatic, adLockReadOnly 'static,read only
'查表:files
[/Quote]
回复
shenymce 2009-08-27
[Quote=引用 2 楼 cosler 的回复:]
fileRS.Open "files", conn, adOpenStatic, adLockReadOnly 'static,read only


files 改成一个SQL语句

fileRS.Open " select * from [files] ", conn, adOpenStatic, adLockReadOnly 'static,read only
'查表:files
[/Quote]
回复
qqweird0001 2009-08-27
顶起来
回复
黑心 2009-08-27
fileRS.Open "files", conn, adOpenStatic, adLockReadOnly 'static,read only


files 改成一个SQL语句

fileRS.Open " select * from [files] ", conn, adOpenStatic, adLockReadOnly 'static,read only
'查表:files
回复
发动态
发帖子
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
社区公告
暂无公告