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 D1DE752A62 for ; Thu, 4 Aug 2005 14:25:25 -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 97878-02 for ; Thu, 4 Aug 2005 17:25:14 +0000 (GMT) Received: from helios.lunarpages.com (helios.lunarpages.com [216.193.217.209]) by svr1.postgresql.org (Postfix) with ESMTP id CCAEB52A4B for ; Thu, 4 Aug 2005 14:25:12 -0300 (ADT) Received: from dsl-201-129-232-126.prod-infinitum.com.mx ([201.129.232.126] helo=vpj.e-evolution.com) by helios.lunarpages.com with esmtpa (Exim 4.50) id 1E0jSw-0003zB-Re; Thu, 04 Aug 2005 10:25:11 -0700 From: =?iso-8859-1?q?V=EDctor_P=E9rez_Ju=E1rez?= Organization: e-Evolution To: pgsql-jdbc@postgresql.org Subject: Re: some improve JDBC Date: Thu, 4 Aug 2005 12:26:34 -0500 User-Agent: KMail/1.8 Cc: Oliver Jowett References: <200508021235.03510.victor.perez@e-evolution.com.mx> <200508031220.16657.victor.perez@e-evolution.com.mx> <42F15E85.5060603@opencloud.com> In-Reply-To: <42F15E85.5060603@opencloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200508041226.34792.victor.perez@e-evolution.com.mx> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - helios.lunarpages.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - e-evolution.com.mx X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.086 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, RCVD_IN_NJABL_PROXY X-Spam-Level: * X-Archive-Number: 200508/31 X-Sequence-Number: 13600 Hi Oliver! The problem is that RowSet launchs an exception when JDBC return -1 this ca= use=20 my Aplicaction does not work the reasons are down. The source code in package javax.sql.rowset.RowSetMetaDataImpl.java /** * Sets the normal maximum number of chars in the designated column * to the given number. * * @param columnIndex the first column is 1, the second is 2, and so on; * must be between 1 and the number of columns,=20 inclusive * @param size the maximum size of the column in chars; must be * 0 or more * @throws SQLException if a database access error occurs, * the given column number is out of bounds, or size is * less than 0 */ public void setColumnDisplaySize(int columnIndex, int size) throws=20 SQLException { if (size < 0) { throw new SQLException("Invalid column display size. Cannot be= =20 less " + "than zero"); } checkColRange(columnIndex); colInfo[columnIndex].columnDisplaySize =3D size; } the same case is for setPrecision,setScale Cheers =2D-=20 V=EDctor P=E9rez Ju=E1rez CEO e-Evolution,S.C.=20 www.e-evolution.com victor.perez@e-evolution.com tel=E9fono: (52)7711070937 skype: vpj-cd El Mi=E9rcoles, 3 de Agosto de 2005 19:17, Oliver Jowett escribi=F3: > V=EDctor P=E9rez Ju=E1rez wrote: > > Of cosure! > > > > my changes are commnet with e-evolution > > [...] > > In the future, please supply a proper diff ('cvs diff -c' will do the > trick if you are working from CVS). It's very hard to see the changes > you've made otherwise. > > It appears to boil down to "return 0 instead of -1 for column display > size when we don't know the actual length"? > > Why is 0 better than -1 in this case? I don't see anything in the JDBC > spec that covers this.. > > -O > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org