Re: Where's SQL error code???

From: Ken McArthur <kwmcarthur(at)attbi(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Where's SQL error code???
Date: 2003-06-01 03:20:14
Message-ID: 200305312120.14834.kwmcarthur@attbi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Saturday 31 May 2003 04:57 pm, Ken McArthur wrote:
Switching to postgres from mysql. mysql jdbc driver
returns the sql error code to SQLWarning.getErrorCode()
(i.e. insert with duplicate entry throws adn SQLException
with getErrorCode() = 1062).

Does anyone know where to get error codes in postgres (using
jdbc driver: pg73jdbc2ee.jar)? I know table is set up
correctly because when I try to insert duplicate entry I
get "ERROR: Cannot insert a duplicate key into unique
index ...". An SQLException is thrown but getErrorCode()
is 0.

Thanks, any suggestion is much appreciated,
Ken

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Andrew Sullivan 2003-06-01 03:56:54 Re: Where's SQL error code???
Previous Message Ken McArthur 2003-05-31 22:57:29 Where's SQL error code???