ORACLE OleDb连接的E_FAIL(0x80004005)错误解决方法

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.

转载于:https://www.cnblogs.com/caca/archive/2005/05/05/149797.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值