Re: Detecting 'socket errors' - closing the Connection object

From: "David Wall" <d(dot)wall(at)computer(dot)org>
To: "pgsql-jdbc" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Detecting 'socket errors' - closing the Connection object
Date: 2003-07-22 17:19:00
Message-ID: 03c201c35075$574bffa0$3201a8c0@rasta
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

> When we get the SQLSTATE patch in you'll be able to do:
>
> if ((e.getSQLState() != null) && (e.getSQLState().equals("08S01")))
> throw new ExplainException("Communication link error: " + e.getMessage());

Thanks, Fernando. Unfortunately, this will be a postgresql-ism, not a JDBC
library-ism, and it will likely require that the user be on a particular
version of the database, too (or is this bit going to work even on 7.3 and
pre 7.3 versions too?). I'm looking for something that doesn't require a
special patch for each of the myriad databases our customers use (MSFT SQL
Server, Oracle, PostgreSQL MySQL and DB2/UDB to name the current list).

David

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message scott.marlowe 2003-07-22 17:22:42 Re: inet type handling
Previous Message Barry Lind 2003-07-22 17:16:23 Re: the IN clause saga