dendenners
Programmer
Hey there,
I am running into a problem with a program I wrote that runs a select statement on an oracle database. The program reads in a file and runs a PreparedStatement on the database for each line using a substring on that line of the file as the bind variable.
The problem I'm having is that I'm running out of cursors on the database. In this particular case, there are 30000 lines to be read in (i.e. the preparedStatement must be run 30000 times) but the query only runs x times before falling over, where x is the number of cursors allowed in the database.
I'm closing the resultset each time I'm finished with it (and doing a resultSet = null as well into the bargain) I'm using the same Connection object for each preparedStatement.
I've tried using the same PreparedStatement for each query, and creating a new one each time. Does anyone have any idea why the cursors aren't being given back to oracle once the query has been executed? Thanks a lot
I am running into a problem with a program I wrote that runs a select statement on an oracle database. The program reads in a file and runs a PreparedStatement on the database for each line using a substring on that line of the file as the bind variable.
The problem I'm having is that I'm running out of cursors on the database. In this particular case, there are 30000 lines to be read in (i.e. the preparedStatement must be run 30000 times) but the query only runs x times before falling over, where x is the number of cursors allowed in the database.
I'm closing the resultset each time I'm finished with it (and doing a resultSet = null as well into the bargain) I'm using the same Connection object for each preparedStatement.
I've tried using the same PreparedStatement for each query, and creating a new one each time. Does anyone have any idea why the cursors aren't being given back to oracle once the query has been executed? Thanks a lot