By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,739 Members | 2,014 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,739 IT Pros & Developers. It's quick & easy.

I face a JDBC problem

dmjpro
100+
P: 2,476
I had a wrong conception in JDBC..that when maximum opened cursors exceed then the corresponding connection to the database is closed automatically.
But I recently I came to know that the connection is still active...
How can I trap that particular exception..
I have also a conception that when a satatement is created then a cursor is opened. Is it true.
On closing the resultset is the corresponding cursor is closed or not.
Plz help me immediately......
Jan 27 '07 #1
Share this Question
Share on Google+
1 Reply


100+
P: 168
> I had a wrong conception in JDBC..that when maximum
> opened cursors exceed then the corresponding
> connection to the database is closed automatically.

Nope.

> But I recently I came to know that the connection is still active...

Right.

> How can I trap that particular exception..

It's not an exception to have a connection open.

> I have also a conception that when a satatement is
> created then a cursor is opened. Is it true.

For queries, yes.

> On closing the resultset is the corresponding cursor is closed or not.

You should always close Connection, Statement, and ResultSet in a finally block.

Source: http://forum.java.sun.com/thread.jspa?threadID=5130079&messageID=9466161#946 6161
Jan 30 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.