From: | Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk> |
---|---|
To: | Moreno Mauri <moreno(dot)mauri(at)italtel(dot)it> |
Cc: | "pgsql-jdbc (at) postgresql (dot) org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: SQLState with pg74.1jdbc3.jar |
Date: | 2004-01-15 15:11:40 |
Message-ID: | 20040115151140.A25805@bacon |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On 15/01/2004 14:50 Moreno Mauri wrote:
> Hi all,
> I'm a newbie in JDBC code.
>
> I tried to execute a Statement.executeUpdate() method to insert a row
> already present in my Postgresql DB.
>
> With JDBC I receive a SQLException but I would like to have
> more informations about the error (something like Duplicate Key
> Exception).
>
> I read that SQLException class have the getSQLState() method, but
> when I call it, the result is null (the getErrorCode() return always 0).
What version of PostgreSQL are you running? To get the error codes
requires a 7.4 server.
HTH
--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants |
http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+---------------------------------------------+
From | Date | Subject | |
---|---|---|---|
Next Message | Dennis Romero L. | 2004-01-15 15:17:17 | Re: SQLState with pg74.1jdbc3.jar |
Previous Message | Moreno Mauri | 2004-01-15 14:50:18 | SQLState with pg74.1jdbc3.jar |