Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: JDBC question
Robert William Vesterman wrote:
> We're having a problem with open cursors (too many of them). It sure
> looks like we're closing everything. However, I noticed one thing
> that looked strange, although I doubt that it would cause a cursor to
> remain open:
>
> Statement stmt = (blah);
> ResultSet rs = stmt.(blah);
>
> (...)
>
> stmt.close();
> rs.close();
>
> What does it mean to close the ResultSet after the Statement has been
> closed? I thought it automatically got closed when its Statement got
> closed.
>
> Again, I doubt this is the problem, but could it be? Maybe something
> like the servlet knows, during the stmt.close(), that it has to retain
> info about rs, since a reference to rs is coming up, but then when it
> gets to the rs.close(), it can't actually do that, since the
> applicable Statement is now gone?
>
> Thanks,
>
> Bob Vesterman.
Hello Bob,
I just did a small test where I closed the (prepared) statement before
closing the result set and it worked fine. I am using Oracle 8.1.6 on
SUN (Solaris 7) and JDK1.2
What exaclty is your error message and what part of the code causes the error?
Cheers,
Avi.
Received on Wed Nov 01 2000 - 01:09:01 CST