ORA-01000:超出打开游标的最大数 的解决办法(C#)
来源:互联网 发布:js input 禁止光标 编辑:程序博客网 时间:2024/06/05 20:05
C#包装了一个数据库操作类,提供一个批量执行sql的函数,执行中遇到【ORA-01000:超出打开游标的最大数 的解决办法】的错误。
查看MSDN的ADODB.Connection的函数Execute说明,发现是调用时一个参数的问题。下面是我包装的函数:
public bool ExecuteSql(string[] strSqlArray) { try { m_cn.BeginTrans(); for (int i = 0; i < strSqlArray.Length; i++ ) { object objAffected; m_cn.Execute(strSqlArray[i], out objAffected, 0); //参数【0】捣的鬼 } m_cn.CommitTrans(); return true; } catch (System.Exception e) { MsgBoxCtrl.MsgBoxException(e.Message, "CDatabase.ExecuteSql"); if (m_cn.State == (int)ConnectionState.Open) { try { m_cn.RollbackTrans(); } catch (System.Exception e1) { MsgBoxCtrl.MsgBoxException(e1.Message, "CDatabase.ExecuteSql"); } } return false; } }
将上面的Execute调用改一下就Ok了
m_cn.Execute(strSql, out objAffected, (int)ADODB.ExecuteOptionEnum.adExecuteNoRecords);
下面是MSDN的说明:
Using the Execute method on a Connection Object (ADO) object executes whatever query you pass to the method in the CommandText argument on the specified connection. If the CommandText argument specifies a row-returning query, any results that the execution generates are stored in a new Recordsetobject. If the command is not intended to return results (for example, an SQL UPDATE query) the provider returns Nothing as long as the option adExecuteNoRecords is specified; otherwise Execute returns a closed Recordset.
MSDN链接地址:https://msdn.microsoft.com/en-us/library/windows/desktop/ms675023(v=vs.85).aspx
- ORA-01000:超出打开游标的最大数 的解决办法(C#)
- ora-01000 超出打开游标的最大数的解决方法
- ORA-01000: 超出打开游标的最大数的问题
- ORA-01000: 超出打开游标的最大数
- 【Oracle异常】ORA-01000: 超出打开游标的最大数
- ORA-01000: 超出打开游标的最大数
- oracle数据库ORA-01000: 超出打开游标的最大数
- Oracle ORA-01000: 超出打开游标的最大数
- ORA-01000: 超出打开游标的最大数
- Oracle: ORA-01000: 超出打开游标的最大数
- Oracle: ORA-01000: 超出打开游标的最大数问题及解决办法
- 处理超出打开游标的最大数异常(ORA-01000: maximum open cursors exceeded)
- ORA-00604 递归 SQL 级别 1 出现错误,ORA-01000 超出打开游标的最大数
- ORA-00604: 递归 SQL 级别 1 出现错误,ORA-01000: 超出打开游标的最大数
- ORA-00604 递归 SQL 级别 1 出现错误,ORA-01000 超出打开游标的最大数
- ORA-00604: 递归 SQL 级别 1 出现错误,ORA-01000: 超出打开游标的最大数
- ORA-01000:超出打开游标的最大数的原因和解决方案
- ORA-01000: maximum open cursors exceeded 超出打开游标的最大数的原因和解决方案
- The request sent by the client was syntactically incorrect
- Android中的动画,自定义补间动画
- floodFill函数
- 【php】include、include_once、require、require_once的区别
- UITableViewCell自定义右边的文字以及更改左边图片的大小
- ORA-01000:超出打开游标的最大数 的解决办法(C#)
- 关于CPU Cache——程序猿需要知道的那些事
- IOS开发—CALayer介绍
- Android 你应该知道的学习资源 进阶之路贵在坚持
- Gson
- 实现从区间产生不重复的随机数 - JS 实现
- UGUI(三)无限循环列表
- keil5 pack install 下载地址
- Linux+Mono+Asp.net入门:05CentOs安装Mono(上)