日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

Access数据库出现的0x80004005 Unspecified error问题

發(fā)布時間:2025/5/22 数据库 43 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Access数据库出现的0x80004005 Unspecified error问题 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

Access數(shù)據(jù)庫出現(xiàn)的0x80004005 Unspecified error問題及解決方案。
[OleDbException (0x80004005): Unspecified error]

項目測試時,結(jié)果出現(xiàn)了下面這樣的問題:

[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

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

而我在自己的電腦是運行時,基本上沒出現(xiàn)這樣的問題,于是反復(fù)的查找原因,不得其解,在MSDN里找到了三篇相關(guān)的文章:其中這一篇還有點道理,與我的錯誤原因達(dá)的上邊。
ms-help://MS.MSDNQTR.2005APR.1033/enu_kboledb/oledb/251254.htm

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.

然而我不解的是,為什么在前幾個星期的測試中沒有這個問題,而在最近幾天,出現(xiàn)的越來越頻繁呢?
在網(wǎng)上找了幾篇相關(guān)的文章(有好多論壇上的帖子也有討論這個問題的,但我沒能找到解決答案):
http://www.issociate.de/board/post/276824/ASP_Error_0x80004005_Unspecified_Error.html
http://www.sitepoint.com/forums/showthread.php?t=213666
http://support.microsoft.com/default.aspx?scid=kb;en-us;825738

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

1、刪除IIS在Windows下的帳號(Internet Guest Account)的文件寫權(quán)限當(dāng)然,只對項目的目錄。
2、同時也刪除它在臨時目錄(C:\Documents and Settings\WEBB-COUNTRY-WU\ASPNET\Local Settings\Temp,不的機器所有不同)的寫權(quán)限。

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

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

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

轉(zhuǎn)載于:https://www.cnblogs.com/pinnasky/archive/2010/10/21/1857427.html

總結(jié)

以上是生活随笔為你收集整理的Access数据库出现的0x80004005 Unspecified error问题的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。