I'm executing a stored procedure from Oracle DB that is:
PROCEDURE GET_TIM_USER_CUSTO(P_ANOMES IN VARCHAR, USER_CUSTO OUT SYS_REFCURSOR)
IS
BEGIN
OPEN USER_CUSTO FOR
SELECT ID, COD_UTILIZADOR,ANO_MES,
TO_NUMBER(DESENCRIPTAR_DADO(CUSTO, (SELECT VALOR
FROM TIM_CONFIG
WHERE PARAMETRO='CRIPT_KEY'))) CUSTO,
TO_NUMBER(DESENCRIPTAR_DADO(CUSTO_EXTRA, (SELECT VALOR
FROM TIM_CONFIG
WHERE PARAMETRO='CRIPT_KEY'))) CUSTO_EXTRA
FROM TIM_USER_CUSTO
WHERE SUBSTR(P_ANOMES, 1, 4)=SUBSTR(ANO_MES, 1, 4);
END GET_TIM_USER_CUSTO;
If I execute it on the Oracle directly it returns a result set well. But If I call this stored procedure in a WebService using Entity Framework
ORA-01722: invalid number
Calling:
ObjectResult<USER_CUSTO> aux = context.TIM_FUNCTIONS_GET_TIM_USER_CUSTO(sAnoMes);
Then it throws an exception, doesn't give any result.