X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 28C5CD1B1D9 for ; Thu, 15 Jul 2004 06:27:44 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77162-07 for ; Thu, 15 Jul 2004 09:27:50 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id CAD11D1B1CE for ; Thu, 15 Jul 2004 06:27:41 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=opencloud.com) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1Bl2KW-0006kK-00; Thu, 15 Jul 2004 21:15:04 +1200 Message-ID: <40F64B13.2070606@opencloud.com> Date: Thu, 15 Jul 2004 21:14:59 +1200 From: Oliver Jowett User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: raokr@india.hp.com Cc: pgsql-jdbc@postgresql.org Subject: Re: error codes using JDBC References: <001201c46a49$f94804e0$e72a0a0f@india.hp.com> In-Reply-To: <001201c46a49$f94804e0$e72a0a0f@india.hp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200407/181 X-Sequence-Number: 10565 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