我在本地机(windows2000 IIS5.0 ACCESS2000)下的ASP程序运行正常?为什么放到远程服务器上就有错误呢?

coollele 2004-04-03 03:27:07
Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'
[Microsoft][ODBC Microsoft Access Driver] 不能更新。数据库或对象为只读。

/inc/line.asp,行15


问题二:

服务器最近总是运行ASP+ACCESS程序时,特别的慢
而在同一台机器里,ASP+SQLSERVER程序时,速度还可以

测试: ASP+ACCESS http://61.144.227.147:81
ASP+SQL2000 http://www.jobjx.com
...全文
43 点赞 收藏 15
写回复
15 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
coollele 2004-04-05
不是的。。。

不是死循环的问题,因为程序原来运行没有问题,包括在本地服务器上测试都是很快的。。。
在没有改动的基础上,为什么到了远程服务器上就这样的效果了???

ASP+ACCESS http://61.144.227.147:81
ASP+SQL2000 http://www.jobjx.com

以上两个网站,都是用ASP程序编写,以前一直用着,也没有什么问题,但是现在只要是ACCESS作为数据库的程序都运行的很慢。。。。。。这是为什么????

回复
hhzh426 2004-04-03
SUMMARY
In a production environment, it is common to trap any errors that occur in your Active Server Pages (ASP) page by using the statement "On Error Resume Next." However, if a script time-out error occurs, it is not possible to trap that error by using this method because the ScriptTimeout is happening separately from the ASP error collection.

If, however, you make the ASP page transactional, you will be able to, in essence, handle the error. When the script time-out occurs, the transaction will have failed, and if you made any changes to a resource that supports transactions, such as Microsoft SQL Server, the changes will be rolled back. In addition, your ASP page can contain a procedure named OnTransactionAbort() that will execute when the transaction fails, even if the failure was due to a time-out or other error in that ASP page. The client will still receive the ASP 0113, but by using OnTransactionAbort, you have the ability to so something after the ScriptTimeout has occurred.
MORE INFORMATION
Transactional ASP pages must be hosted on Internet Information Server 4.0 or higher. To make an ASP page transactional, the page must contain the "TRANSACTION=required" argument in the @ Directives tag on the first line of the page.

The following code sample demonstrates trapping the script time-out error:
<%@ TRANSACTION=Required LANGUAGE="VBScript" %>
<HTML>
<HEAD>
<TITLE>Simple Transactional Web Page</TITLE>
</HEAD>
<BODY BGCOLOR="White" topmargin="10" leftmargin="10">
<font size="4" face="Arial, Helvetica">
<b>Transactional Web Page</b></font><br>
<hr size="1" color="#000000">
<p>
This is an example of an Aborted Transaction.
This transaction will abort due to a Script
Time-out error, which is an error that you
could not trap without a transaction.
</p>
<p>
Please wait until the script times out...
</p>

<%
Do while 1 = 1
'Infinite Loop
Loop
%>
</BODY>
</HTML>
<%
' The Transacted Script Abort Handler. This sub-routine
' will be called if the script transacted aborts

Sub OnTransactionAbort()
Response.Write "<p><b>The Transaction just aborted</b>."
Response.Write "This message came from the "
Response.Write "OnTransactionAbort() event handler."
end sub
%>

NOTE: This script will run until one of two events occurs. Either Server.ScriptTimeout is reached and an ASP 0113 is returned, or because the page is enlisting in a transaction, it is being affected by the default transaction timeout of 60 seconds.

You can determine which event occurred in the IIS log files. If the script times out as a result of exceeding Server.ScriptTimeout, an "ASP 0113" will be reported to the client and logged in the Web logs.

If the page is terminated because of a transaction timeout, an "HTTP 200" will be recorded in the Web log, indicating a success. Only by checking OnTransactionAbort will you see this failure.

是不是你的程序执行过程中碰到了死循环的问题,比如是依赖于获取到的数据来改变循环的次数,而忘记了做必要的判断来避免死循环。
回复
spacet 2004-04-03
我也碰到了那种权限问题,要怎么解决呢??
回复
hhzh426 2004-04-03
两个内容不一样,没有办法比较
回复
coollele 2004-04-03
问题二:

服务器最近总是运行ASP+ACCESS程序时,特别的慢
而在同一台机器里,ASP+SQLSERVER程序时,速度很快
测试: ASP+ACCESS http://61.144.227.147:81
ASP+SQL2000 http://www.jobjx.com

大家可以帮着测试一下。。。这两个网站在同一台服务器上唯一的不同是数据库,一个是ACCESS 一个是SQL2000
回复
pewer 2004-04-03
是不是网速有问题?
回复
coollele 2004-04-03
在相同的配置下的本地服务器上运行一点问题没有。。。而且很快,但是不知怎的。。一放到远程服务器上就慢下来了。。。
回复
popcode 2004-04-03
是不是你程序写得有问题
回复
coollele 2004-04-03
没有人访问。。。记录就几条而以。
回复
hhzh426 2004-04-03
有多少记录?有多少人同时访问?(如果这两个参数值都很大的话,还是用数据库服务器吧!)
回复
coollele 2004-04-03
多谢楼上的大侠,第一个问题我搞定了。。
可是我第二个问题,为什么运行很慢,慢到最后变成了如下提示:超时了

请问怎样解决。。。????


Active Server Pages 错误 'ASP 0113'

脚本超时

/main.asp

超过了脚本运行的最长时间。您可以通过指定 Server.ScriptTimeOut 属性值来修改此限制或用 IIS 管理工具来修改它。
回复
chushicheng 2004-04-03
如果访问量较大的话,用sql server会快些,access不适用用于访问量大的地方
回复
coollele 2004-04-03
那第二个问题是?????什么原因呢?也是权限问题!
回复
webdevelop 2004-04-03
权限问题!
回复
popcode 2004-04-03
文件权限问题
回复
发动态
发帖子
ASP
创建于2007-09-28

2.8w+

社区成员

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