how to know a connection is already closed? 
Author Message
 how to know a connection is already closed?

I have a program running on the server, it will get lots of SQL query.
each time a new connection has to be open. It is very slow.

So I opened several connection in the beginning. then new query comming,
it will just use a opened connection.
But the problem is sometime, after a long time, no query coming.
The connection will be closed automaticly (timeout).
What I want to is check if the connection is still available before i
give it to a query.

How do I do this? .isClosed() is not working, because I never close the
connection.
one idea is I run something first. like select * from atable. catch the
Exception. but atable has to be exist. it is not a generic solution.
Anyone has a solution?
Thanks in advance.

--== Sent via Deja.com http://www.***.com/
---Share what you know. Learn what you don't.---



Tue, 06 Nov 2001 03:00:00 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. java.sql.SQLException: JZ0C0: Connection is already closed.

2. Connection::Close doesn't actually close connection?

3. When closing a connection, recordset is also closed!

4. Does ADO Connection.Close ,Closes all open Recordsets

5. Help! close() closes multiple db connections

6. Closing connection closes recordset???

7. Help! close() closes multiple db connections

8. ERROR: closetable: table already closed for sdes

9. closing an application already opened with VBA 6 ??

10. Mesg 17423 : closetable: table already closed for sdes 045d9690

11. Mesg 17423:closetable:table already closed for sdes


 
Powered by phpBB® Forum Software