1
votes

In my asp.net page return "ORA-06502: PL/SQL: numeric or value error: character string buffer too small".

but in toad does well.

this is my oracle procedure and asp.net code.

CREATE OR REPLACE PROCEDURE FIS.test(res out varchar2)
 IS

BEGIN
   res := 't430intw2sBn0UQx8WWO0FlsYLcLOPaJ:1R3xHpLiQGw12xXintomQc3oXbiJtvmw';
END test;

-

public String Foo()
        {
            string queryString = "TEST";

            OracleParameter[] parameters = 
                { 
                    new OracleParameter("OUT_CURSOR", OracleDbType.Varchar2, ParameterDirection.Output)
                };

            return ExecuteScalar(CommandType.StoredProcedure, queryString, parameters);
        }
1

1 Answers

1
votes

You need to give the size of your varchar(2) here:

new OracleParameter("OUT_CURSOR", OracleDbType.Varchar2, ParameterDirection.Output)

Something like:

new OracleParameter("OUT_CURSOR", OracleDbType.Varchar2,32767, ParameterDirection.Output)