Re: JDBC CallableStatement bug on functions with return parameter

From: Lew <noone(at)lewscanon(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JDBC CallableStatement bug on functions with return parameter
Date: 2011-02-06 16:24:00
Message-ID: iimhuq$f51$3@news.albasani.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

(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|
|_____|_____|
|===========|

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Maciek Sakrejda 2011-02-06 17:31:11 Re: SQL select doesn't work
Previous Message Leonid Vygovskiy 2011-02-06 08:40:53 SQL select doesn't work