I face a JDBC problem

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

Source: http://www.thescripts.com/forum/thread593913.html

[552 byte] By [rengaraja] at [2007-11-26 16:34:39]
# 1

> 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.

%

duffymoa at 2007-7-8 22:59:23 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...