Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] 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


oratta wrote:
> 
> 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.
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
> 
> 

-- 
View this message in context: http://old.nabble.com/How-to-use-NUMBER-type-argument-to-Call-PLSQLStoredProcedureCall--tp28273709p28287783.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top