pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: raokr@india.hp.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: error codes using JDBC
Date: Thu, 15 Jul 2004 21:14:59 +1200
Message-ID: <40F64B13.2070606@opencloud.com> (raw)
In-Reply-To: <001201c46a49$f94804e0$e72a0a0f@india.hp.com>
References: <001201c46a49$f94804e0$e72a0a0f@india.hp.com>

Krishnakanth Rao wrote:
> Hi,
> 
> I'am using the jdbc driver pg73jdbc3.jar in my jdbc code to acces PostGRE
> SQL. Whenever a sql exception occurs it doesnt give me the appropriate error
> code , eg referential integrity constraint voilated etc. The error code from
> the SQLException is always zero.
> 
> How do I obtain the exact error code as mentioned in PostGRE documents

Use a 7.4 or later driver (get a recent driver from jdbc.postgresql.org) 
against a 7.4 or later server; you should then get a useful SQLState in 
most cases.

-O



view thread (3+ messages)

Message-ID: <40F64B13.2070606@opencloud.com>
Permalink:  ../40F64B13.2070606@opencloud.com/
Also on:    postgresql.org/message-id/40F64B13.2070606@opencloud.com

 · 

reply

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: oliver@opencloud.com, raokr@india.hp.com
  Subject: Re: error codes using JDBC
  In-Reply-To: <40F64B13.2070606@opencloud.com>
  References: <001201c46a49$f94804e0$e72a0a0f@india.hp.com> <40F64B13.2070606@opencloud.com>

* 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