超出打开游标的最大数异常的解决

news/2024/5/18 23:27:24 标签: PreparedStatement, 游标, JDBC
for(){
PreparedStatement pst = con2.prepareStatement(sql3);
pst.executeUpdate();//每次执行  都打开一次游标
}

达到最大时 就会报错  处理超出打开游标的最大数异常(ORA-01000: maximum open cursors exceeded)

 

除了去修改配置外 最简单的方式是 每次打开执行完毕后立即关闭游标

for(){
PreparedStatement pst = con2.prepareStatement(sql3);
pst.executeUpdate();//每次执行 都打开一次游标

pst.close();//关闭游标 否则 超出打开游标的最大数

}

 


http://www.niftyadmin.cn/n/914420.html

相关文章

mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法

mysql 1449 : The user specified as a definer (root%) does not exist 解决方法权限问题,授权 给 root 所有sql 权限mysql> grant all privileges on *.* to root"%" identified by ".";Query OK, 0 rows affected (0.00 sec)…

第六章部分例题

没看解答敲了一遍,发现自己题目的理解能力有点差 1 #include <iostream>2 #include <cstdio>3 4 using namespace std;5 6 struct Node7 {8 char value;9 Node* ch1;10 Node* ch2;11 Node* ch3;12 Node* ch4;13 14 Node():ch1(NULL),ch2(N…

一个tomcat配置多个不同端口的项目

1、将要同时启动的项目放入不同的webapps文件夹中 2、修改tomcat安装目录下的conf-->setting.xml文件 <?xml version"1.0" encoding"UTF-8"?> <!--Licensed to the Apache Software Foundation (ASF) under one or morecontributor license…

mybatis 官方文档

http://www.mybatis.org/mybatis-3/zh/index.html

ABAP中Collect的用法

vaule&#xff1a;collect在非数值字段相同的情况下&#xff0c;起到了数值字段汇总作用。 非数值字段不同的情况下&#xff0c;效果和append相同执行插入内表操作&#xff0c;当非数值字段相同的时候&#xff0c;则相当于modify的效果&#xff0c;只不过是将数值字段进行汇总相…

解决升级至apache-tomcat-9.0.31后AJP 配置报错问题

The AJP Connector is configured with secretRequired"true" but the secret attribute is either null or "". This combination is not valid. 意思就是在tomcat9中 需要配置 一个属性 secretRequired

Fedora svn GUI图形界面差异对比xxdiff

sudo dnf install xxdiff-tools -y xx-svn-diff test.txt

【BZOJ3052】[wc2013]糖果公园 带修改的树上莫队

【BZOJ3052】[wc2013]糖果公园 Description Input Output Sample Input Sample Input Sample Output 84 131 27 84HINT 题解&#xff1a;区间中的带修改的莫队做法&#xff1a;将块的大小设为n^2/3&#xff0c;将所有询问按照(l所在块&#xff0c;r所在块&#xff0c;time)排序…