Re: error codes using JDBC

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: raokr(at)india(dot)hp(dot)com
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: error codes using JDBC
Date: 2004-07-15 09:14:59
Message-ID: 40F64B13.2070606@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Stefano Bonnin 2004-07-15 09:47:14 Re: SSL Problem
Previous Message Kris Jurka 2004-07-15 09:12:46 Re: error codes using JDBC