Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 707003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:13:44+00:00 2026-05-14T04:13:44+00:00

I have this stored procedure: CREATE OR REPLACE PROCEDURE LIQUIDACION_OBTENER ( p_Cuenta IN NUMBER,

  • 0

I have this stored procedure:

CREATE OR REPLACE PROCEDURE "LIQUIDACION_OBTENER" (
  p_Cuenta IN NUMBER, 
  p_Fecha IN DATE,
  p_Detalle OUT LIQUIDACION.FILADETALLE%TYPE
) IS

BEGIN 

  SELECT FILADETALLE
    INTO p_Detalle
    FROM Liquidacion
   WHERE (FILACUENTA = p_Cuenta)
     AND (FILAFECHA = p_Fecha);

END;
/

…and my c# code:

string liquidacion = string.Empty;

OracleCommand command = new OracleCommand("Liquidacion_Obtener");            

command.BindByName = true;
command.Parameters.Add(new OracleParameter("p_Cuenta", OracleDbType.Int64));
command.Parameters["p_Cuenta"].Value = cuenta;
command.Parameters.Add(new OracleParameter("p_Fecha", OracleDbType.Date));
command.Parameters["p_Fecha"].Value = fecha;

command.Parameters.Add("p_Detalle", OracleDbType.Varchar2, ParameterDirection.Output);            

OracleConnectionHolder connection = null;

connection = this.GetConnection();
command.Connection = connection.Connection;
command.CommandTimeout = 30;
command.CommandType = CommandType.StoredProcedure;
OracleDataReader lector = command.ExecuteReader();

while (lector.Read())
{
    liquidacion += ((OracleString)command.Parameters["p_Detalle"].Value).Value;
}

the thing is that when I try to put a value into the parameter “Fecha” (that is a date) the code gives me this error (when the line command.ExecuteReader(); is executed)

Oracle.DataAccess.Client.OracleException : ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYSTEM.LIQUIDACION_OBTENER", line 9
ORA-06512: at line 1

I tried with the datetime and was not the problem, I eve tried with no input parameters and just the output and still got the same error. Aparently the problem is with the output parameter.
I already tried putting p_Detalle OUT VARCHAR2 instead of p_Detalle OUT LIQUIDACION.FILADETALLE%TYPE but it didn’t work either

I hope my post is understandable..
thanks!!!!!!!!!!

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:13:44+00:00Added an answer on May 14, 2026 at 4:13 am

    Probably… this can be the problem. Try to use Oracle to_date function to match the date format.

    If that doesn’t work, as a last resort change the parameter to varchar and pass the date as a string to the stored procedure. Use to_date inside Oracle.

    This way your stored procedure would be:

    CREATE OR REPLACE PROCEDURE "LIQUIDACION_OBTENER" (
    p_Cuenta IN NUMBER, 
    p_Fecha IN VARCHAR,
    p_Detalle OUT LIQUIDACION.FILADETALLE%TYPE
    ) IS
    
    BEGIN 
    
        SELECT 
            FILADETALLE
        INTO
            p_Detalle
        FROM 
            Liquidacion
        WHERE 
            (FILACUENTA = p_Cuenta)
            AND (FILAFECHA = to_date(p_Fecha, 'yyyy-MON-dd'));
    
    END;
    

    Oracle/PLSQL: To_Date Function

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following stored procedure: create or replace PROCEDURE A2CountSkus (v_count out Number
I have this stored procedure for Oracle: create or replace procedure bns_saa_message_get() <--- PROBLEM
I have stored-procedure in Oracle database like this: create or replace PROCEDURE EDYTUJ_PRACOWNIKA (PR_IMIE
I have stored procedure: CREATE OR REPLACE udp_get_employeeaddress ( result_set out sys_refcursor ) AS
i have a simple oracle stored procedure proc1 as follows: CREATE OR REPLACE PROCEDURE
Here I have a stored procedure in Oracle: CREATE OR REPLACE PROCEDURE StP_COMPS IS
I have this stored procedure that I want to use for my SAP crystal
I have this stored procedure, which is mapped in an Entity Framework 4.1 object.
If I have this stored proc definition minus the body ALTER PROCEDURE sp_AlloctionReport(@where NVARCHAR(1000),
I have a stored procedure that has this line: SET @SQL = 'SELECT path,title,tags

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.