Detecting 'socket errors' - SQLSTATE patch

From: "David Wall" <d(dot)wall(at)computer(dot)org>
To: "pgsql-jdbc" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Detecting 'socket errors' - SQLSTATE patch
Date: 2003-07-22 17:55:35
Message-ID: 043401c3507a$73e5d460$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());
....

> First of all, this is plain SQL + JDBC specs.

Really! Wow, now that's cool. When will the SQLSTATE patch be available?
And it will really work with Oracle and DB2, too? That's precisely the kind
of solution I'm looking for. Perhaps I'll write my code to work with or
without it for now, unless that patch will be available shortly. I need my
solution to be in place in a week or so, and I think my current coding
workaround will be compatible (sending the Connection and SQLException to a
pool handler), though this may save the 'select 1' hack.

David

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kim Ho 2003-07-22 18:23:51 Fix for getXXX (numbers)
Previous Message Fernando Nasser 2003-07-22 17:54:40 Re: JDBC install