xp中正常,03中不正常的一段代码,请高手帮忙

aykkk 2010-07-25 11:32:32
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Acc_db="sqlhope.mdb"
ConnStr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath(Acc_db)

Set conn = Server.CreateObject("ADODB.Connection")
conn.open ConnStr
set rs=conn.execute("select * from SqlIn")
%>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<table width="600" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="25">id</td>
<td>fs</td>
</tr>
<% do while not re.eof %>
<tr>
<td height="25"> <%= rs("id") %></td>
<td> <%= rs("sqlin_ip") %></td>
</tr>
<% rs.movenext
loop %>
</table>
</body>
</html>
<% rs.close
set rs=nothing
conn.close
set conn=nothing %>

这段代码在xp中执行正常,但是在win2003中错误,提示未指定的错误 ,错误行就是conn.open ConnStr,怎么回事?
...全文
66 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
aykkk 2010-07-26
  • 打赏
  • 举报
回复
搞定了,原来是03的iis有问题
SNOYC 2010-07-25
  • 打赏
  • 举报
回复
如果不是父路径的问题,你就得查看下你的系统是不是论坛版的。
原版的是不可能出现XP下可以,03下不行的现象的。
有些时候错误不一定是代码,也有可能是运行环境的问题的
怪才 2010-07-25
  • 打赏
  • 举报
回复
他这里根本没用到父路径。不是这个问题。

[Quote=引用 2 楼 yousite1 的回复:]
估计没启动父路径。iis服务器
[/Quote]
yousite1 2010-07-25
  • 打赏
  • 举报
回复
估计没启动父路径。iis服务器
youngsheep 2010-07-25
  • 打赏
  • 举报
回复
看看数据库文件访问权限,是不是只读了,或者是无权限

28,409

社区成员

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

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