Windos2003(SP1)+Oracle8.16+DotNetFormwork v1.1.4322系統
在串連Oracle資料時候,開始沒有問題,可是過了一會就出現了:System.Data.OleDb.OleDbException: 未指定的錯誤: E_FAIL(0x80004005)的問題,於是Google了一下,沒有什麼解決方案,Baidu了一下,才找到瞭解決辦法:
把相應的Oracle所在分區轉換為NTFS格式.
Solution Description :
You need to give the Authenticated User privilege to the Oracle Home by following these steps: 1. Log on to Windows as a user with Administrator privileges. 2. Launch Windows Explorer from the Start Menu and and navigate to the ORACLE_HOME directory. 3. Right-click on the ORACLE_HOME folder and choose the "Properties" option from the drop down list. A "Properties" window should appear. 4. Click on the "Security" tab on the "Properties" window. 5. Click on "Authenticated Users" item in the "Name" list (on Windows XP the "Name" list is called "Group or user names"). 6. Uncheck the "Read and Execute" box in the "Permissions" list (on Windows XP the "Permissions" list is called "Permissions for Authenticated Users"). This box will be under the "Allow" column. 7. Check the "Read and Execute" box. This is the box you just unchecked. 8. Click the "Apply" button. 9. Click the "OK" button. 10. You may need to reboot your computer after these changes have been made. Re-execute the application and it should now work.
按照上面的方法其實還是不行,重新編譯Web項目後,不時的還會出現上述問題,但是重新啟動電腦就沒有問題了.不知道到底是什麼原因,安裝了MDAC2.8,以後最好不要使用Sysetm.Data.OleDb,最好使用System.Data.OracleClient(需要安裝ADO.NET for Oracle Data Provider)
Google搜到的一些資料
SYMPTOMS
The following error message may appear when 5000 records or more are retrieved, and when each record contains 4 bytes of data:
8007000e Not enough storage is available to complete this operation.
With a client-side cursor (in other words, when an ActiveX Data Objects (ADO) Recordset's CursorLocation property is set to adUseClient), the following error occurs instead:
80004005 Data provider or other service returned an E_FAIL status
Note that the computer is not really out of memory. Microsoft OLE DB Provider for Oracle and its internal algorithm, which attempts to allocate a buffer to hold the rows, fails if the rowset size is 4 bytes or less.
SYMPTOMS
A call to certain stored procedures that contain parameters may fail, resulting in OLE DB error 0x80004005 when using the Microsoft OLEDB Provider for Oracle older than version 2.10.3912.0.
CAUSE
In the MS Oracle OLEDB Provider at times there is not enough memory allocated to handle stored procedure parameters of a specific cumulative size or greater. This condition appears to generate an Oracle error 6215, but the provider does not trap for this particular error and simply fails the call with the generic "0x80004005 Errors occurred" error.
RESOLUTION
It is possible to reduce the number of parameters in your SQL Statement and thereby avoid this error. Or you can choose to select the Microsoft OLEDB Provider for ODBC, so you may connect to the Oracle database through an Oracle ODBC driver.