a亚洲精品_精品国产91乱码一区二区三区_亚洲精品在线免费观看视频_欧美日韩亚洲国产综合_久久久久久久久久久成人_在线区

首頁 > 數據庫 > Access > 正文

解決Access出現的0x80004005問題

2024-09-07 19:05:18
字體:
來源:轉載
供稿:網友

這篇論壇文章著重介紹了Access數據庫出現0x80004005問題的解決方法,更多內容請參考下文:

項目做了三個月了,終于也差不多完成了,昨天交去測試,結果出現了下面這樣的問題:

[OleDbException (0x80004005): Unspecified error]

System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20

System.Data.OleDb.OleDbConnection.InitializeProvider() +57

System.Data.OleDb.OleDbConnection.Open() +203

Webb.WAVE.Controls.OleDBManager.FillDataTable(DataTable i_dataTable) +85

Webb.WAVE.Controls.WaveExpire.LoadExpireDateForClient(DataTable i_table, Int64 i_clientID) +189

Webb.WAVE.inc_Client_AccessManage.LoadExpireDate(String i_sortKey) +99

Webb.WAVE.inc_Client_AccessManage.Page_Load(Object sender, EventArgs e) +85

System.Web.UI.Control.OnLoad(EventArgs e) +67

System.Web.UI.Control.LoadRecursive() +35

System.Web.UI.Control.LoadRecursive() +98

System.Web.UI.Control.LoadRecursive() +98

System.Web.UI.Page.ProcessRequestMain() +750

說明一下:這個錯誤總會在運行一段時間后出現,而等一會工(不定多少時間),或者重新啟動IIS或者服務器,這個問題就解決了。而再運行一會又會(時間越來越短)出現這個問題。

而我在自己的電腦是運行時,基本上沒出現這樣的問題,于是反復的查找原因,不得其解,在MSDN里找到了三篇相關的文章:其中這一篇還有點道理:

SYMPTOMS

When trying to connect to an Access .mdb file, an ODBC error is returned stating "Disk or Network Error". The Microsoft OLE DB Provider for the Microsoft Jet database engine may also return an "Unspecified error" (error code = 0x80004005) message.

The problem can occur only when the data source is opened under the Microsoft Internet Information Server (IIS) or a Microsoft Windows NT service but not under a logged-on user account.CAUSE

Jet creates a temporary file when the engine is started. In doing so, it first checks the TMP environment variable and uses that path to define where the temporary file is created. If it doesn't see a TMP environment variable, it looks for the TEMP environment variable. If TEMP is not defined, it then uses the Windows folder (/WINDOWS or /WINNT).

If TMP/TEMP is defined but points to a nonexistent folder, the error occurs.

Moreover, when opening the Access database through IIS or a Windows NT service, and when IIS or the service is running under the local system account, the TMP or TEMP system environment variable is used. When the Web services or Windows NT service are started using a user account, the TMP/TEMP user profile environment variables is used.RESOLUTION

Define a TMP or TEMP environment variable and assign the variable to an existing folder. If you are accessing the Access database from IIS, be certain to check the system environment settings rather than environment variables of the logged-on user. Also ensure that the IUSER anonymous IIS account has access to the temporary folder.

You must restart the computer after changing any environment variables.

Environment variables are set under Windows NT 4.0 by going to the Control Panel and clicking System and then selecting the Environment tab.

然而我不解的是,為什么在前幾個星期的測試中沒有這個問題,而在最近幾天,出現的越來越頻繁呢?

在網上找了幾篇相關的文章(有好多論壇上的帖子也有討論這個問題的,但我沒能找到解決答案):

思考幾小時間后,我想會不會是不能建立臨時文件的原因呢?其實只要能讓錯誤在我自己的電腦上出現,那我就好辦了,但問題是,只是偶而出現在我的電腦上,而且很快就好了,從頭到尾都只出現過兩三次。但在服務器上卻出現問題越來越多了,幾分鐘就不行了。根據前面的一些文章來分析,我決定做以下一個測試:

1、刪除IIS在Windows下的帳號(Internet Guest Account)的文件寫權限當然,只對項目的目錄。

2、同時也刪除它在臨時目錄(C:/Documents and Settings/WEBB-COUNTRY-WU/ASPNET/Local Settings/Temp,不的機器所有不同)的寫權限。

好了,終于在我的電腦上也出現了同樣的錯誤,而且所有的與數據庫相關的頁面都不能訪問。而且根據MSDN里的說明,這是因為沒有權限在臨時目錄里寫文件而產生的,與之相同。然而,問題又在于,服務器上的并不是一直錯誤,而是一時錯誤一時正常。

唯一可以解釋的就是服務器臨時文件滿了!!!!而這又不好證明,我不可能一直測試,讓我的臨時文件也滿了(就算是COPY文件到臨時目錄里,也不能算是IIS帳號的,而是操作者的),而且臨時文件它自己(OLEDB的鏈接線程)也會刪除的。只好另外想辦法,就是用磁盤配額。給IIS帳號:Internet Guest Account在C盤只有10K的寫權限,然后測試,果然問題如期而致。。。。。。

到此,可以肯定:服務器上的臨時文件太多了,看來是要重新啟動一下服務器,或者要清理臨時文件或者調整磁盤空間了……

希望這篇文章能幫助那些還沒有解決問題的人。同時,MS網站及MSDN上的幾篇文章也都還很有幫助意義的,特別是說明的其它幾個錯誤原因……

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 一区二区三区在线观看免费 | 福利视频网址 | 久久久美女 | 狠狠综合 | 国产黄a三级三级三级av在线看 | 日韩在线观看中文字幕 | 欧产日产国产精品一二 | 高清一区二区三区 | 美日韩免费视频 | 男女视频在线 | 日本午夜精品 | 国产精品视频免费观看 | 成人毛片在线免费看 | 欧美| 欧美一区二区三区在线看 | 欧美三级欧美成人高清www | 69av片 | 免费黄色福利网站 | 国产一区二区三区91 | 99久久99久久精品国产片果冻 | 成人黄色在线 | 免费日韩av | 日韩精品一区二区三区中文在线 | 亚洲精品电影网在线观看 | 久久久久久九九九 | 久久久久中文字幕 | 久久国产精品久久精品 | 成人羞羞在线观看网站 | 久久黄色片 | 国产精品久久久久久吹潮 | 中文字幕三区 | 91精品久久久久久久久久 | 91麻豆视频 | 日韩欧美视频一区 | 欧美日韩在线精品 | 国产在线精品一区二区三区 | 狠狠久久婷婷 | 久久草草影视免费网 | 免费a在线看| 午夜一本 | 福利视频网址导航 |