ORA-06502 PL/SQL character string buffer too small

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ren? M?hle

    ORA-06502 PL/SQL character string buffer too small

    I have a psp script with a procedure just to run an update on one
    table.

    The Problem occurs when I try to compile this script with pspload:
    ORA-20006: "frsys_updatere port.psp": compilation failed with the
    following errors.
    ORA-06502: PL/SQL: numeric or value error: character string buffer too
    small

    Here the whole script:
    =============== =============== =============== =============== =============== ===
    <%@ page language="PL/SQL" %>
    <%@ plsql procedure="frsy s_updatereport" %>
    <%@ plsql parameter="p_fa ultnum" type="comp.faul ttab.faultnum%T YPE"%>
    <%@ plsql parameter="p_pe rssurname"
    type="comp.faul ttab.perssurnam e%TYPE"%>
    <%@ plsql parameter="p_pe rsinitials"
    type="comp.faul ttab.persinitia ls%TYPE"%>
    <%@ plsql parameter="p_pe rstitle"
    type="comp.faul ttab.perstitle% TYPE"%>
    <%@ plsql parameter="p_pe rsemail"
    type="comp.faul ttab.persemail% TYPE"%>
    <%@ plsql parameter="p_pe rsofficetel"
    type="comp.faul ttab.persoffice tel%TYPE"%>
    <%@ plsql parameter="p_pe rscontacttel"
    type="comp.faul ttab.perscontac ttel%TYPE"%>
    <%@ plsql parameter="p_pe rsbuilding"
    type="comp.faul ttab.persbuildi ng%TYPE"%>
    <%@ plsql parameter="p_pe rsfloor"
    type="comp.faul ttab.persfloor% TYPE"%>
    <%@ plsql parameter="p_pe rsroom" type="comp.faul ttab.persroom%T YPE"%>
    <%@ plsql parameter="p_pe rskeysavailable at"
    type="comp.faul ttab.perskeysav ailableat%TYPE" %>
    <%@ plsql parameter="p_fa ultcategory"
    type="comp.faul ttab.faultcateg ory%TYPE"%>
    <%@ plsql parameter="p_fa ultdescription"
    type="comp.faul ttab.faultdescr iption%TYPE"%>
    <%@ plsql parameter="p_fa ultassetnumber"
    type="comp.faul ttab.faultasset number%TYPE"%>
    <%@ plsql parameter="sign edoff" type="comp.faul ttab.signedoff% TYPE"%>
    <%
    UPDATE comp.faulttab
    SET comp.faulttab.p erssurname=p_pe rssurname,
    comp.faulttab.p ersinitials=p_p ersinitials,
    comp.faulttab.p erstitle=p_pers title,
    comp.faulttab.p ersemail=p_pers email,
    comp.faulttab.p ersofficetel=p_ persofficetel,
    comp.faulttab.p erscontacttel=p _perscontacttel ,
    comp.faulttab.p ersbuilding=p_p ersbuilding,
    comp.faulttab.p ersfloor=p_pers floor,
    comp.faulttab.p ersroom=p_persr oom,
    comp.faulttab.p erskeysavailabl eat=p_perskeysa vailableat,
    comp.faulttab.f aultcategory=p_ faultcategory,
    comp.faulttab.f aultdescription =p_faultdescrip tion,
    comp.faulttab.f aultassetnumber =p_faultassetnu mber,
    comp.faulttab.s ignedoff=p_sign edoff;
    WHERE comp.faulttab.f aultnum = p_faultnum;
    %>
    =============== =============== =============== =============== =============== ===

    If I use this kind of script with just 3 or 4 parameters everthing
    works fine. But as soon as the number of parameters get a bit bigger I
    get this "character string buffer too small".

    May the table-definition is usefull for a solution:
    =============== =============== =============== =============== =============== ===
    FAULTNUM NOT NULL NUMBER(6)
    FAULTID NOT NULL VARCHAR2(15)
    PERSNUM NOT NULL NUMBER(9)
    PERSSURNAME NOT NULL VARCHAR2(30)
    PERSINITIALS NOT NULL VARCHAR2(6)
    PERSTITLE VARCHAR2(4)
    PERSEMAIL VARCHAR2(80)
    PERSOFFICETEL VARCHAR2(80)
    PERSCONTACTTEL VARCHAR2(80)
    PERSBUILDING NOT NULL NUMBER(4)
    PERSFLOOR NOT NULL NUMBER(3)
    PERSROOM NOT NULL VARCHAR2(7)
    PERSKEYSAVAILAB LEAT VARCHAR2(100)
    FAULTCATEGORY NOT NULL NUMBER(5)
    FAULTDESCRIPTIO N VARCHAR2(500)
    FAULTASSETNUMBE R NUMBER(6)
    TECHRESP NUMBER(9)
    DATEREPORTED NOT NULL DATE
    DATEUPDATED DATE
    DATECOMPLETED DATE
    SIGNEDOFF NUMBER(9)
    TECHCOMMENTS VARCHAR2(500)
    SOLUTIONDESCRIP TION VARCHAR2(500)
    =============== =============== =============== =============== =============== ===

    Any idea or sugestion where I made a fault?
  • Ren? M?hle

    #2
    Re: ORA-06502 PL/SQL character string buffer too small

    renemuehle@gmx. de (Ren? M?hle) wrote in message news:<2943356f. 0408240306.5c3a 18b6@posting.go ogle.com>...

    I have found the problem. It is located in the definition of the type.

    <%@ plsql parameter="p_pe rssurname" type="comp.faul ttab.perssurnam e%TYPE"
    default="''"%>
    This compiles without a problem.

    <%@ plsql parameter="p_pe rskeysavailable at" type="comp.faul ttab.perskeysav ailableat%TYPE"
    default="''"%>
    This doesn't compile and create the error:
    ORA-20006: "frsys_updatere port.psp": compilation failed with the
    following errors.
    ORA-06502: PL/SQL: numeric or value error: character string buffer too
    small

    <%@ plsql parameter="p_pe rskeysavailable at" type="VARCHAR2"
    default="''"%>
    This also compiles without a problem. The row
    comp.faulttab.p erskeysavailabl eat is defined as VARCHAR2.

    It seams there is a strict limit for the lenght of the name (string)
    in the type-declaration. Anyone there who knows about such
    restrictions and may know how to change this limit?

    Comment

    Working...