com.inet.tds.SQLException and Opta 2000 driver
From: Cathy (cathywigzell_at_yahoo.co.uk)
Date: 02/11/04
- Next message: kaiwing18_at_hotmail.com: "How to count the result from sql statement?"
- Previous message: Jeff Rhines: "Re: JDO or O/R Mapper ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 11 Feb 2004 08:09:33 -0800
I'm using the Opta 2000 driver to access a remote MS SQL database. If
the connection to the remote database has been lost (e.g. the server
it's on may have been rebooted) then the driver throws a
com.inet.tds.SQLException with the message 'Connection reset by peer:
socket write error'. The SQLException has a private member variable,
a, with a declared type of Throwable but a concrete type of
SocketException. It would be very useful to get hold of the
SocketException. For example,
if ( exception.a instanceof SocketException )
{
// try to open a new connection to the database
}
How can I
a) get hold of com.inet.tds.SQLExcpetion.a, or
b) use an alternative method to determine that the connection should
be reopened?
Many thanks for your help,
Cathy
- Next message: kaiwing18_at_hotmail.com: "How to count the result from sql statement?"
- Previous message: Jeff Rhines: "Re: JDO or O/R Mapper ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|