Am I doing something wrong here? Why wouldn't the same open data path be opened if was opened once before.
Is it the way I am closing my statement/result set objects?
I was told once that all I had to do, was just close the statement object once the query was done, becuase it would automatically close the ResultSet object with it. But I have seen where other people are closing the ResultSet and the Statement object.
If I were to close the ResultSet first and then the Statement object, would this help with the number of open data paths.
Sorry if this is a really lame question, but I don't have a whole lot of experience with JDBC stuff, and how everything works in the background.
Any help is appreciated.
You must explicitly close the ResultSet and Statement objects after you finish using them. This applies to all ResultSet and Statement objects you create when using the Oracle JDBC Drivers. ... If you do not explicitly close your ResultSet and Statement objects, serious memory leaks could ocur. You could also run out of cursors in the database.
Unfortunately it may vary from database to database, depending on the JDBC drivers. But it can't hurt to close those ResultSet instances and see what happens ...
[ October 31, 2003: Message edited by: Wayne L Johnson ]