数码鹭岛论坛

标题: ASP+ACCESS的80004005问题 [打印本页]

作者: 翔子    时间: 2006-12-1 15:18
标题: ASP+ACCESS的80004005问题
原来运行好好的网站, 换了新电脑. 就一直出这个错.
Temporary (volatile) Jet DSN for process

换个连接方式,又出下面这个错
Microsoft JET Database Engine (0x80004005)

所有的程序都没有动过. 再网上找了许久, 有说路径问题的,有说权限问题的

一一试过, 都不起作用

而且新的系统基本全部是照着旧电脑移植过来的. 配置完全一致,不可能有问题

然后试着升级jet4.0驱动. 结果提示已经是最高版本了. 怕有驱动文件损坏.手工替换了所有驱动文件

还是没有解决.

不得已.在电脑上重新装了一套操作系统. 这下都正常. 狂郁闷. 总不成为了iis,专门留一个操作系统.重新装软件耗时太大.

继续寻找

终于在ms网站上找到了解决方案
[url=http://support.microsoft.com/kb/296711/EN-US/]http://support.microsoft.com/kb/296711/EN-US/

内容我拷贝过来:
PRB: "Unspecified error" Error 7399 Using OPENROWSET Against Jet Database[url=http://support.microsoft.com/kb/296711/EN-US/#appliesto]View products that this article applies to.
Article ID:296711
Last Review:December 1, 2003
Revision:4.0
This article was previously published under Q296711
SYMPTOMSWhen you run a query by using the OPENROWSET function against a Jet database, this error message occurs: Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
[OLE/DB provider returned message: Unspecified error]

This problem also occurs with any linked server query that uses the Jet provider, such as the OPENQUERY function or the Transact-SQL query with four-part names.  

CAUSEThe Jet engine needs to create temporary files. To create the temporary files, the Jet engine uses the TEMP and TMP system environment variables. If the TEMP and TMP system environment variables do not exist, Jet uses the %WINDIR% folder. If the SQL Server service account does not have permissions to create, write, delete and read files in the %WINDIR% folder, or to the folder pointed to by the TEMP or TMP system environment variable, the error occurs.  

WORKAROUNDTo work around this problem, use of the the following two methods.

Method 1
1.Configure the TEMP and TMP system environment variables to point to a folder (for instance, C:\TEMP).
2.Set the permissions to the SQL Server service account on this folder as Full Control.
3.Restart the server.
Note In addition to granting full control to the SQL Server service account, any user that connects to the computer that is running SQL Server by using Windows Authentication must also be granted full control to the same TEMP and TMP directories that the SQL Server service account uses. Before you instantiate the OLEDB provider, SQL Server impersonates the account that is connecting to the computer that is running SQL Server if it is using a trusted connection.

Method 2
If there is not a TEMP or TMP system environment variable, set the permissions to the SQL Server service account on the %WINDIR% folder as Full Control -or-

Make the SQL Server service account a member of a group that has such permissions on the %WINDIR% folder.
其实原因很简单. 我拷贝系统过来的时候,没有新建temp目录. 因为我的环境变量都是迁移过来的. 造成temp变量找不到路径. 重新设置一下tmp和temp变量就好了

如果是ntfs的需要相应设置一下权限问题即可.

这么一个问题, 耗了我一天时间. 找遍中文网站和论坛, 尽然只有提问的,没有解决的. 只好自己写下来了.

做后人之鉴.
作者: 翔子    时间: 2006-12-1 16:54
标题: 其他错误
[XP操作系统下出现“Microsoft OLE DB Provider for ODBC Drivers (0x80004005) 操作必须使用一个可更新的查询”错误的解决办法]
----------------------------------------------------------------------------
地址:
[url=http://www.nosoo.com/article/asp/0x80004005.htm]http://www.nosoo.com/article/asp/0x80004005.htm
================================================
以下为原贴:

原文地址:
[url=http://neural.cs.nthu.edu.tw/jang/courses/cs3431/student/accessErrorFaq_916718/]http://neural.cs.nthu.edu.tw/jan ... essErrorFaq_916718/
仅供学习之用,请勿擅自转载。

======================================
以ASP連結MS Access資料庫常見錯誤訊息彙整表
( ASP Microsoft Access Database Errors FAQ's )

======================================
錯誤代碼
無法更新資料庫


中文版: [Microsoft][ODBC Microsoft Access 驅動程式]無法更新. 資料庫或物件是唯讀的.

英文版:Cannot update. Database or object is read-only. Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.

因為使用者嘗試新增或更新資料等動作,但卻沒有足夠權限時會出現的錯誤訊息.解決方法為修改資料表權限, ,另外也有可能是伺服器端的資料庫正開啟中,因此造成無法更新的狀況,需先把該資 料表關閉後,才能新增或更新資料.

設定方式如下:

1.點選Access資料表=>按右鍵選內容==>安全性選項(Security) =>
點選新增(add)按鈕

2.然後將
IUSER 新增至允許名單中

3.在屬性視窗中,勾選
允許讀 與 寫的權限,(全部勾選也可以) 如下所示,然後點選確定 完成設定.

----------------------------------------------------------------------
錯誤代碼
參數太少

中文版:Microsoft OLE DB Provider for ODBC Drivers 錯誤 '80040e10' [Microsoft][ODBC Microsoft Access Driver] 參數太少,預期個數 1。

英文版:Microsoft OLE DB Provider for ODBC Drivers (0x80040E10) [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

此類型錯誤產生的原因在於SQL指令可能有錯誤.例如:SQL指令中的欄位名稱可能與實體資料表中的欄位 名稱不符,因此解決方式為重新檢查程式碼中的SQL條件運算式,是否有拼錯字等狀況.
----------------------------------------------------------------------
錯誤代碼
BOF EOF問題


中文版:ADODB.Field (0x800A0BCD) 可能是 BOF 或 EOF 的值為 True,或目前的記錄已被刪除。所要求的操作需要目前的記錄

英文版:ADODB.Recordset (0x800A0BCD) Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
此類型問題屬於資料集(recordset)的問題.這類問題發生的原因,一般是使用者送出了查詢條件,但送回的 結果卻是空的,即沒有符合查詢條件的資料.解決的方式為重先檢查查詢條件的設定與recordset的設定, 在傳回查詢條件時,確定不是一筆空的資料.
----------------------------------------------------------------------
錯誤代碼
運作必須使用更新查詢


中文版:Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Microsoft Access Driver] 運作必須使用更新查詢\r

英文版:Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.

因為使用者嘗試新增或更新資料等動作,但卻沒有足夠權限時會出現的錯誤訊息.解決方法為修改資料表權限, 設定方式同上
----------------------------------------------------------------------
錯誤代碼
無法開啟登錄鍵


中文版:[Microsoft][ODBC Microsoft Access Driver]一般錯誤 無法開啟登錄鍵 'Temporary (volatile) Jet DSN for process 0x898 Thread 0x914 DBC 0x209e024 Jet'

英文版:Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x6cc Thread 0x78c DBC 0x144cfc4 Jet'.

這個問題可能有很多原因,最常見的情況為資料庫的路徑設定不正確,因此需要檢查檔案中資料庫路徑的設定 與實體目錄對印是否正確.另外,IIS的權限設定也會影響,需檢查該IUSER是否有存取權限,關於IUSER的權限設定 可參考範例
設定方式同上
----------------------------------------------------------------------
錯誤代碼
找不到檔案

英文版:Microsoft JET Database Engine (0x80004005) Could not find file 'C:\Inetpub\wwwroot\databaseName.mdb'.
此類型錯誤產生的原因在於資料表路徑的設定出錯,因此找不到asp檔案中所指定的相對應資料庫.解決 方式為重新檢查資料表的路徑設定是否正確.
----------------------------------------------------------------------
錯誤代碼
資料表被鎖定


Microsoft JET Database Engine error '80004005' Table 'tblTable' is exclusively locked by user 'Admin' on machine 'MyMachine'.

此類型錯誤產生的原因在於無法存取該資料表或是該資料表目前為'設計檢視"的狀態.解決方法將Access中 的設計檢視視窗關閉,確定資料表不是處於設計檢視狀態下即可.
----------------------------------------------------------------------
錯誤代碼
檔案正在使用中


Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver] Could not use '(unknown)'; file already in use.

此類型錯誤產生的原因有可能因為資料庫的權限設定出錯,另外一原因則是MDAC (Microsoft Data Access Components )的版本有錯,請確認安裝的ODBC版本是4,0以上. 版本資訊可參考

ODBC的版本資訊





欢迎光临 数码鹭岛论坛 (http://www.clore.net/forum/) Powered by Discuz! X3.2