Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id EA8051337B54 for ; Sun, 6 Feb 2011 12:51:00 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 77799-09 for ; Sun, 6 Feb 2011 16:50:53 +0000 (UTC) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id 697A41337BC3 for ; Sun, 6 Feb 2011 12:50:53 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.4/8.14.4) with ESMTP id p16Gor3p071331 for ; Sun, 6 Feb 2011 12:50:53 -0400 (AST) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.4/8.14.4/Submit) id p16GNtqp022681 for pgsql-jdbc@postgresql.org; Sun, 6 Feb 2011 12:23:55 -0400 (AST) (envelope-from news) From: Lew X-Newsgroups: pgsql.interfaces.jdbc Subject: Re: JDBC CallableStatement bug on functions with return parameter Date: Sun, 06 Feb 2011 11:24:00 -0500 Organization: albasani.net Lines: 32 Message-ID: References: <4D4D1729020000250003A44E@gw.wicourts.gov> <4D4D791B.30704@aquafold.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit In-Reply-To: <4D4D791B.30704@aquafold.com> Cancel-Lock: sha1:x0aQwsd8pagC0mKygQFUSa1L/j8= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 Injection-Info: news.albasani.net; logging-data="KfgQrD+ICxaUtL7/6HIRiI1CuVpNduG254XR4AVhtVWFMvfLbLfX6uAnWZxSzUxp+XzAOhwC6/o2wooAGujOFovgLtPs5eXBIyyw66vj1NMC7ihHIp64HHWa/g5Rs8+M"; mail-complaints-to="abuse@albasani.net" To: pgsql-jdbc@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.51 tagged_above=-10 required=5 tests=BAYES_05=-0.5, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/31 X-Sequence-Number: 21429 (Please do not top-post.) John LH wrote: > > I create the CallableStatement with this : > > callStatement = conn.prepareCall("{ ? = CALL "public"."sales_tax"(?) }"); > > For the return parameter I use : > > callStatement.registerOutParameter(1, java.sql.Types.FLOAT); > > For the function parameter I use : > > callStatement.setObject(2, new Float(25.25)); You do realize that 'float' ('Float') is pretty much the worst type to use for monetary facts, right? -- Lew Ceci n'est pas une fenĂȘtre. .___________. |###] | [###| |##/ | *\##| |#/ * | \#| |#----|----#| || | * || |o * | o| |_____|_____| |===========|