Calling ParameterLength illegally (ORA-6502)... : Procedure Call « Stored Procedure Function « Oracle PL / SQL






Calling ParameterLength illegally (ORA-6502)...

   

SQL>
SQL> CREATE OR REPLACE PROCEDURE ParameterLength (
  2    p_Parameter1 IN OUT VARCHAR2,
  3    p_Parameter2 IN OUT NUMBER) AS
  4  BEGIN
  5    p_Parameter1 := 'abcdefghijklmno';
  6    p_Parameter2 := 12.3;
  7  END ParameterLength;
  8  /

Procedure created.

SQL>
SQL> DECLARE
  2    v_Variable1 VARCHAR2(10);
  3    v_Variable2 NUMBER(7,3);
  4  BEGIN
  5    ParameterLength(v_Variable1, v_Variable2);
  6  END;
  7  /
DECLARE
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "JAVA2S.PARAMETERLENGTH", line 5
ORA-06512: at line 5


SQL>

   
    
  








Related examples in the same category

1.Call a stored procedure in a PL/SQL block
2.Call a stored procedure then other statements
3.Dependency Example
4.Forward Declarations
5.Exceptions in Subprograms
6.A PL/SQL procedure with no parameter
7.Exception throwed out of procedure call
8.Default parameter value
9.Pass parameter by data type
10.Use named notation
11.Use named notation, but with a different order of the formal parameters
12.This script demonstrates how to create and call a simple procedure.