From: Ian Pilcher <i.pilcher@comcast.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: Foreign key constraint & getErrorCode
Date: Fri, 10 Sep 2004 21:33:41 -0500
Message-ID: <chto65$pf2$1@sea.gmane.org> (raw)
In-Reply-To: <41422E22.1010104@opencloud.com>
References: <chsidf$6ha$1@sea.gmane.org>
<41422E22.1010104@opencloud.com>
Oliver Jowett wrote:
> Try SQLException.getSQLState() instead. The backend returns (somewhat
> standardized) alphanumeric SQL states with errors and the driver exposes
> these as via getSQLState(). getErrorCode() is numeric, vendor-specific,
> and unused by the current driver.
Works like a charm. Thanks!
(I didn't realize that the PostgreSQL error codes were alphanumeric;
makes it kind of hard to pack into an integer.)
--
========================================================================
Ian Pilcher i.pilcher@comcast.net
========================================================================
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: i.pilcher@comcast.net
Subject: Re: Foreign key constraint & getErrorCode
In-Reply-To: <chto65$pf2$1@sea.gmane.org>
References: <chsidf$6ha$1@sea.gmane.org> <41422E22.1010104@opencloud.com> <chto65$pf2$1@sea.gmane.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox