java.sql.SQLException: - ORA-01000: maximum open cursors exceeded

后端 未结 13 1716
鱼传尺愫
鱼传尺愫 2020-11-22 08:36

I am getting an ORA-01000 SQL exception. So I have some queries related to it.

  1. Are maximum open cursors exactly related to number of JDBC connections, or are t
13条回答
  •  青春惊慌失措
    2020-11-22 09:01

    Did you set autocommit=true? If not try this:

    { //method try starts  
        String sql = "INSERT into TblName (col1, col2) VALUES(?, ?)";
        Connection conn = obj.getConnection()
        pStmt = conn.prepareStatement(sql);
    
        for (String language : additionalLangs) {
            pStmt.setLong(1, subscriberID);
            pStmt.setInt(2, Integer.parseInt(language));
            pStmt.execute();
            conn.commit();
        }
    } //method/try ends { 
        //finally starts
        pStmt.close()
    } //finally ends 
    

提交回复
热议问题