Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Re: How to use NUMBER type argument to Call PLSQLStoredProcedureCall?

I cleared this problem using String value.

 PLSQLStoredProcedureCall procedureCall = new PLSQLStoredProcedureCall();
 procedureCall.addNamedArgument(parameterName, JDBCTypes.VERCHAR_TYPE);

eclipselink call the procedure using String value.
and Oracle converts the VARCHAR TYPE value to NUMBER TYPE.

thanks

2010/4/17 Kentaro Uesugi <oratta@xxxxxxxxx>:
> Hi,
>
> I try to call a procedure which has an argument as NUMBER type.
> The argument treats very large number such as 9.990+E125.
> procedure test_proc(
>    arg1  NUMBER
> );
>
> When I call the method PLSQLStoredProcedureCall#addNamedArgument to
> call the procedure, I cannot set NUMBER type . NUMBER_TYPE is not
> exist in JDBCTypes.
> Instead of using NUMBER type , I use NUMERIC type (JDBCTypes.NUMERIC_TYPE)
>
> PLSQLStoredProcedureCall procedureCall = new PLSQLStoredProcedureCall();
> procedureCall.addNamedArgument(parameterName, JDBCTypes.NUMERIC_TYPE);
>
> Then procedureCall  create a PL/SQL DECLARE block internally. It calls
> the procedure with the argument as a NUMERIC type . So we cannot use
> very large number such as 9.990+E125.
>
> DECLARE
>  arg1_TARGET NUMERIC := :1;
> BEGIN
>  ....
>
> How can I use NUMBER type argument to Call PLSQLStoredProcedureCall?
> Is it impossible?
>
>
> Regards.
>


Back to the top