An ORA-01000 SQL exception is occurring for me. I ther, therefore, some questions about it.
- How closely do the maximum open cursors relate to the amount of JDBC connections, and how closely do they relate to the statement and resultset objects we have created for each connection? (We are ututilizing connection pool.)
- Is it possible to set the database's maximum number of statement/resultset objects (like connect single-threaded
- In a single threaded environment, is it prefeutilizeo utilise instance variable statement/resultset object rather than method local statement/resultset object?
- Does running a prepared statement while in a loop exacerbate this problem? Note: pStmt is closed once the loop has finished. (Of course, I could have used sqlBatch.)
{ //method try starts
String sql = "INSERT into TblName (col1, col2) VALUES(?, ?)";
pStmt = obj.getConnection().prepareStatement(sql);
pStmt.setLong(1, subscriberID);
for (String language : additionalLangs) {
pStmt.setInt(2, Integer.parseInt(language));
pStmt.execute();
}
} //method/try ends
{ //finally starts
pStmt.close()
} //finally ends
5. What will happen if conn.createStatement() and conn.prepareStatement(sql) are called multiple times on single connection object ?