pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
error codes using JDBC
3+ messages / 3 participants
[nested] [flat]

* error codes using JDBC
@ 2004-07-15 08:59  Krishnakanth Rao <raokr@india.hp.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Krishnakanth Rao @ 2004-07-15 08:59 UTC (permalink / raw)
  To: pgsql-jdbc

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

Regards
K Krishnakanth Rao
Senior Software Engineer
HP Global Delivery India Center

29 Cunningham Road
Bangalore - 560 052  India

+91 80 22051374 DID
+91 98456 82188 Mobile

Disclaimer:
This e-mail, and any files transmitted with it are "HP Confidential" and
intended solely for the use of the individual or entity to whom it is
addressed. If you have received this e-mail in error, please discard the
message and notify me directly.





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: error codes using JDBC
@ 2004-07-15 09:12  Kris Jurka <books@ejurka.com>
  parent: Krishnakanth Rao <raokr@india.hp.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Kris Jurka @ 2004-07-15 09:12 UTC (permalink / raw)
  To: Krishnakanth Rao <raokr@india.hp.com>; +Cc: pgsql-jdbc



On Thu, 15 Jul 2004, Krishnakanth Rao wrote:

> 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.

Error codes are a new feature and are only available when using a 7.4 or 
newer server and jdbc driver.

Kris Jurka



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: error codes using JDBC
@ 2004-07-15 09:14  Oliver Jowett <oliver@opencloud.com>
  parent: Krishnakanth Rao <raokr@india.hp.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Oliver Jowett @ 2004-07-15 09:14 UTC (permalink / raw)
  To: raokr@india.hp.com; +Cc: 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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2004-07-15 09:14 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-07-15 08:59 error codes using JDBC Krishnakanth Rao <raokr@india.hp.com>
2004-07-15 09:12 ` Kris Jurka <books@ejurka.com>
2004-07-15 09:14 ` Oliver Jowett <oliver@opencloud.com>

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