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 A3D3C3A1EC4 for ; Tue, 9 Nov 2004 12:10:33 +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 87186-07 for ; Tue, 9 Nov 2004 12:10:22 +0000 (GMT) Received: from rigel.lunarpages.com (rigel.lunarpages.com [64.235.230.106]) by svr1.postgresql.org (Postfix) with ESMTP id B08F33A3BC0 for ; Tue, 9 Nov 2004 12:10:23 +0000 (GMT) Received: from cpanel by rigel.lunarpages.com with local (Exim 4.43) id 1CRUqQ-0006kn-C6 for pgsql-jdbc@postgresql.org; Tue, 09 Nov 2004 04:11:30 -0800 Received: from 61.11.66.222 ([61.11.66.222]) by granwill.com (IMP) with HTTP for ; Tue, 9 Nov 2004 04:11:30 -0800 Message-ID: <1100002290.4190b3f250932@granwill.com> Date: Tue, 9 Nov 2004 04:11:30 -0800 From: deepthi@granwill.com To: pgsql-jdbc@postgresql.org Subject: Refcursor class not found MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.2 X-Originating-IP: 61.11.66.222 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - rigel.lunarpages.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [32001 32003] / [47 12] X-AntiAbuse: Sender Address Domain - granwill.com X-Source: /usr/local/cpanel/3rdparty/bin/php X-Source-Args: /usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/base/horde/imp/compose.php X-Source-Dir: :/base/horde/imp X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.3 tagged_above=0.0 required=5.0 tests=NO_REAL_NAME X-Spam-Level: X-Archive-Number: 200411/83 X-Sequence-Number: 11505 hello everybody, I have created a function to display the rows in a table. The function is returning the refcursor. I am calling the refcursor in Callable Statement, but i am getting No class found for refcursor. I have seen these queries earlier in this forum. I am using postgresql 7.3.4 and pg73jdbc3.jar. As per the solutions given for earlier queries i tried to give getString(1), but i am getting null value. i am attaching the code along with this mail. This is my pl/pgsql CREATE or REPLACE FUNCTION displayall() RETURNS refcursor AS ' DECLARE cursor1 cursor for select pageid,keyword from Maintable; BEGIN open cursor1; return cursor1; END; 'language 'plpgsql'; My jdbc code is con.setAutoCommit(false); CallableStatement cstmt2=null; cstmt2=con.prepareCall("{? = call displayall()}"); cstmt2.registerOutParameter(1,Types.OTHER); cstmt2.executeUpdate(); ResultSet rs2=(ResultSet)cstmt2.getObject(1); i am getting No class found for refcursor and the error is pointing to cstmt2.executeUpdate() line. I also tried to use con.setAutoCommit(false); CallableStatement cstmt2=null; cstmt2=con.prepareCall("{? = call displayall()}"); cstmt2.registerOutParameter(1,Types.OTHER); String test=cstmt2.getString(1); But test is pointing to null. Can anyone please help me in solving this problem. I need to sort out this issue at the earliest as i need to use Callable Statement in JDBC and also pl/pgsql. Reply awaited. Regards, deepthi