Re: ErrorCodes suddenly stopped working? [possibly my

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: ErrorCodes suddenly stopped working? [possibly my
Дата
Msg-id Pine.BSO.4.61.0511140035260.4900@leary.csoft.net
обсуждение исходный текст
Ответ на ErrorCodes suddenly stopped working? [possibly my programming error]  (Assad Jarrahian <jarraa@gmail.com>)
Список pgsql-jdbc

On Sun, 13 Nov 2005, Assad Jarrahian wrote:

>         catch(SQLException ex) {
>             if (ex.getErrorCode()== 23505)
>
> before it would throw getErrorCode() as 23505 with a duplicate
> username. Now all it throws is 0 (for other prepared statements as
> well).

Postgresql has never used error codes, these are vendor specific numbers
and I'm guessing you ran this code against some other database.
Postgresql reports SQL State values.  Use SQLException.getSQLState()
instead.

Kris Jurka


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Assad Jarrahian
Дата:
Сообщение: ErrorCodes suddenly stopped working? [possibly my programming error]
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: prepareThreshold=1 and statement.executeBatch() ??