OLE Automation 内部错误

Atai-Lu 2008-07-07 01:56:33
Microsoft JET Database Engine 错误 '80040e14'

OLE Automation 内部错误

/userinfo.asp,行 15
---------------------
代码如下:

<!--#include file="include/conn.asp"-->
<!--#include file="include/fun.asp"-->
<%
dim depar
depar = Trim(Request("depar"))
if not isnumeric(depar) or depar="" then depar=0
dim where
if depar<>0 then
' sql="select * from [UserTable] where [Department]=1" '执行此sql则报错
sql="select * from [UserTable] where [Department]="& depar '这个也会报错(我确定Department字段存在且为数字类型)
'Response.Write(sql):Response.End()
else
sql="select * from [UserTable]" '这个可以正常执行
end if
'//本地运行正常,服务器上报错
set rs=conn.execute(sql)'报错的是这里
'set rs = Server.CreateObject("adodb.recordset")
'sql="select * from [UserTable] "&where&" order by uid asc"
'rs.open sql,conn,1,1 '这种方式同样报错
do while not rs.eof
%>
<a href="" onclick="insert('<%=rs("UserName")%>');return false;"><%=rs("UserName")%>(<%=getDepartment(rs("Department"))%>)</a><br/>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>

以下代码在服务器上可以正常执行

<!--#include file="include/conn.asp"-->
<!--#include file="include/fun.asp"-->
<%
dim tid
tid = Trim(Request("tid"))
if not isnumeric(tid) or tid="" then tid=0
set rs=conn.execute("select * from [TopicList] where tid="&tid)
if not rs.eof then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right"> 录入人:</td>
<td align="left"> <%=rs("UserName")%> 分机号:<%=rs("TelPhone")%></td>
</tr>
<tr>
<td align="right"> 负责人:</td>
<td align="left"> <%=rs("Manage")%> 分机号:<%=rs("ManageTelPhone")%></td>
</tr>
<tr>
<td align="right"> 进度:</td>
<td align="left"> <%=getWorkState(rs("WorkState"))%></td>
</tr>
</table>
<%
else
Response.Write("没有找到对应的信息...")
end if
rs.close
set rs=nothing
%>
...全文
1576 36 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
36 条回复
切换为时间正序
请发表友善的回复…
发表回复
也儿夕坛说 2011-10-08
  • 打赏
  • 举报
回复
你把该字段改为字符串型看看是不是没问题
Atai-Lu 2008-07-08
  • 打赏
  • 举报
回复
[Quote=引用 34 楼 chinmo 的回复:]
你把该字段改为字符串型看看是不是没问题
[/Quote]
不管啦,换服务器
反正也就那台服务器出问题,其它电脑都正常
  • 打赏
  • 举报
回复
你把该字段改为字符串型看看是不是没问题
hxkuse 2008-07-08
  • 打赏
  • 举报
回复
数据库传上来看看??
Atai-Lu 2008-07-08
  • 打赏
  • 举报
回复
[Quote=引用 27 楼 chinmo 的回复:]
设置 Common Files/ADO 和 WINDOWS/System32 目录的权限为允许 IUSR 可以读和执行。


The solution was not to set permissions for the folder, they were correct.

The solution was to set permissions for Common Files/ADO and
WINDOWS/System32 to allow IUSR to read and execute.
[/Quote]
呃,试过了,没用,哎
Atai-Lu 2008-07-08
  • 打赏
  • 举报
回复
[Quote=引用 28 楼 chinmo 的回复:]
http://groups.google.com/group/microsoft.public.inetserver.asp.db/browse_thread/thread/a29bceea6f9cae18/217e94326653419b?lnk=st&q=internal+OLE+Automation+error+access+update&rnum=4#217e94326653419b

看看这个
[/Quote]
跟这个描述的不大一样,它的方法也没解决这个问题
我这边就那个表带where子句查询的时候报错,而且也就是那个页面报错,其它页面,同样的一张表同样使用conn.execute()执行查询都没报错
数据库反复覆盖N次,改页面代码反复覆盖了N次,依然没法解决问题
Atai-Lu 2008-07-08
  • 打赏
  • 举报
回复
[Quote=引用 27 楼 chinmo 的回复:]
设置 Common Files/ADO 和 WINDOWS/System32 目录的权限为允许 IUSR 可以读和执行。


The solution was not to set permissions for the folder, they were correct.

The solution was to set permissions for Common Files/ADO and
WINDOWS/System32 to allow IUSR to read and execute.
[/Quote]
这个没试过,其它的都试过了
不过估计也难解决,因为其它页面类似的代码都可以正常执行,就那个页面死活都报错
  • 打赏
  • 举报
回复
你把该字段改为字符串行看看是不是没问题
  • 打赏
  • 举报
回复
http://groups.google.com/group/microsoft.public.inetserver.asp.db/browse_thread/thread/a29bceea6f9cae18/217e94326653419b?lnk=st&q=internal+OLE+Automation+error+access+update&rnum=4#217e94326653419b

看看这个
  • 打赏
  • 举报
回复
设置 Common Files/ADO 和 WINDOWS/System32 目录的权限为允许 IUSR 可以读和执行。


The solution was not to set permissions for the folder, they were correct.

The solution was to set permissions for Common Files/ADO and
WINDOWS/System32 to allow IUSR to read and execute.

  • 打赏
  • 举报
回复
set rs = Server.CreateObject("adodb.recordset")
sql="select * from [UserTable] where [Department]="& depar&" order by uid asc"
rs.open sql,conn,1,1
这样也报错????
wcwtitxu 2008-07-07
  • 打赏
  • 举报
回复
以前遇到过,那时候是因为Access里面有几个日文符号
Atai-Lu 2008-07-07
  • 打赏
  • 举报
回复
谢谢各位^_^
Atai-Lu 2008-07-07
  • 打赏
  • 举报
回复
[Quote=引用 22 楼 xuStanly 的回复:]
试试看吧,呵呵,死马当活马医。
[/Quote]
看看再说,明天交辞职报告再来结贴
xuStanly 2008-07-07
  • 打赏
  • 举报
回复
试试看吧,呵呵,死马当活马医。
xuStanly 2008-07-07
  • 打赏
  • 举报
回复
给服务器装script5.7看看。
Atai-Lu 2008-07-07
  • 打赏
  • 举报
回复
我觉得,还是服务器的问题,因为我们公司的电脑都可以正常运行,就那台破服务器有问题
别的远程服务器也没问题,郁闷了
Atai-Lu 2008-07-07
  • 打赏
  • 举报
回复
也不是这个问题哦

哎,真奇怪了...
xuStanly 2008-07-07
  • 打赏
  • 举报
回复
估计是select *的字段里面有一些字符有问题
http://my.vicn.com/article.asp?id=122
看是不是这个问题。
Atai-Lu 2008-07-07
  • 打赏
  • 举报
回复
access数据库
sql="select * from [UserTable] where [Department]=1"'& depar
有错
加载更多回复(15)

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧