X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 791893A56D0 for ; Fri, 3 Dec 2004 14:20:43 +0000 (GMT) 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 97539-08 for ; Fri, 3 Dec 2004 14:20:13 +0000 (GMT) Received: from smtp0.libero.it (smtp0.libero.it [193.70.192.33]) by svr1.postgresql.org (Postfix) with ESMTP id 0554F3A586E for ; Fri, 3 Dec 2004 14:20:16 +0000 (GMT) Received: from localhost (172.16.1.83) by smtp0.libero.it (7.0.027-DD01) id 40D2BD600260F06E for pgsql-interfaces@postgresql.org; Fri, 3 Dec 2004 15:20:16 +0100 Received: from libero.it (172.16.1.111) by smtp2.libero.it (7.0.027-DD01) id 40C73470011B762C for pgsql-interfaces@postgresql.org; Fri, 3 Dec 2004 15:20:35 +0100 Date: Fri, 3 Dec 2004 15:20:15 +0100 Message-Id: Subject: jdbc and refcursor problem MIME-Version: 1.0 X-Sensitivity: 3 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable From: "Gaetano Sferra" To: "pgsql-interfaces" X-XaM3-API-Version: 4.1 (B27) X-type: 0 X-SenderIP: 217.59.38.133 X-Virus-Scanned: by amavisd-new at libero.it serv4 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.376 tagged_above=0 required=5 tests=DNS_FROM_RFC_POST X-Spam-Level: * X-Archive-Number: 200412/5 X-Sequence-Number: 5176 Hello to all, I need to process a cursor returned by a stored function,=0D = reading the jdbc driver docs I learned how to do it but I got a strange b= ehavior using metadata. For xample: CallableStatement cstm =3D conn.= prepareCall("{ ? =3D call myfunction() }"); cstm.registerOutParameter(1,= Types.OTHER); cstm.execute(); ResultSet rs =3D (ResultSet) cstm.getO= bject(1); ResutlSetMetaData rsmd =3D rs.getMetaData(); int columns =3D= rsmd.getColumnCount() // <-- this throw a NullPointerException I got = a NullPointerException when try to retrieve the ResultSet column count=0D = even if the ResultSet contains or not data. Is there a workaround? Tha= nks, Gaetano Sferra=0A=0A=0A=0A_________________________________________= ___________________=0ALibero ADSL: 3 mesi gratis e navighi a 1.2 Mega, se= nza costi di attivazione.=0AAbbonati subito su http://www.libero.it=0A