dbTalk Databases Forums  

ORA-06502 PL/SQL character string buffer too small

comp.databases.oracle comp.databases.oracle


Discuss ORA-06502 PL/SQL character string buffer too small in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ren? M?hle
 
Posts: n/a

Default ORA-06502 PL/SQL character string buffer too small - 08-24-2004 , 06:06 AM






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_updatereport.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="frsys_updatereport" %>
<%@ plsql parameter="p_faultnum" type="comp.faulttab.faultnum%TYPE"%>
<%@ plsql parameter="p_perssurname"
type="comp.faulttab.perssurname%TYPE"%>
<%@ plsql parameter="p_persinitials"
type="comp.faulttab.persinitials%TYPE"%>
<%@ plsql parameter="p_perstitle"
type="comp.faulttab.perstitle%TYPE"%>
<%@ plsql parameter="p_persemail"
type="comp.faulttab.persemail%TYPE"%>
<%@ plsql parameter="p_persofficetel"
type="comp.faulttab.persofficetel%TYPE"%>
<%@ plsql parameter="p_perscontacttel"
type="comp.faulttab.perscontacttel%TYPE"%>
<%@ plsql parameter="p_persbuilding"
type="comp.faulttab.persbuilding%TYPE"%>
<%@ plsql parameter="p_persfloor"
type="comp.faulttab.persfloor%TYPE"%>
<%@ plsql parameter="p_persroom" type="comp.faulttab.persroom%TYPE"%>
<%@ plsql parameter="p_perskeysavailableat"
type="comp.faulttab.perskeysavailableat%TYPE"%>
<%@ plsql parameter="p_faultcategory"
type="comp.faulttab.faultcategory%TYPE"%>
<%@ plsql parameter="p_faultdescription"
type="comp.faulttab.faultdescription%TYPE"%>
<%@ plsql parameter="p_faultassetnumber"
type="comp.faulttab.faultassetnumber%TYPE"%>
<%@ plsql parameter="signedoff" type="comp.faulttab.signedoff%TYPE"%>
<%
UPDATE comp.faulttab
SET comp.faulttab.perssurname=p_perssurname,
comp.faulttab.persinitials=p_persinitials,
comp.faulttab.perstitle=p_perstitle,
comp.faulttab.persemail=p_persemail,
comp.faulttab.persofficetel=p_persofficetel,
comp.faulttab.perscontacttel=p_perscontacttel,
comp.faulttab.persbuilding=p_persbuilding,
comp.faulttab.persfloor=p_persfloor,
comp.faulttab.persroom=p_persroom,
comp.faulttab.perskeysavailableat=p_perskeysavaila bleat,
comp.faulttab.faultcategory=p_faultcategory,
comp.faulttab.faultdescription=p_faultdescription,
comp.faulttab.faultassetnumber=p_faultassetnumber,
comp.faulttab.signedoff=p_signedoff;
WHERE comp.faulttab.faultnum = 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)
PERSKEYSAVAILABLEAT VARCHAR2(100)
FAULTCATEGORY NOT NULL NUMBER(5)
FAULTDESCRIPTION VARCHAR2(500)
FAULTASSETNUMBER NUMBER(6)
TECHRESP NUMBER(9)
DATEREPORTED NOT NULL DATE
DATEUPDATED DATE
DATECOMPLETED DATE
SIGNEDOFF NUMBER(9)
TECHCOMMENTS VARCHAR2(500)
SOLUTIONDESCRIPTION VARCHAR2(500)
================================================== ============================

Any idea or sugestion where I made a fault?

Reply With Quote
  #2  
Old   
Ren? M?hle
 
Posts: n/a

Default Re: ORA-06502 PL/SQL character string buffer too small - 08-25-2004 , 07:37 AM






renemuehle (AT) gmx (DOT) de (Ren? M?hle) wrote in message news:<2943356f.0408240306.5c3a18b6 (AT) posting (DOT) google.com>...

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

<%@ plsql parameter="p_perssurname" type="comp.faulttab.perssurname%TYPE"
default="''"%>
This compiles without a problem.

<%@ plsql parameter="p_perskeysavailableat" type="comp.faulttab.perskeysavailableat%TYPE"
default="''"%>
This doesn't compile and create the error:
ORA-20006: "frsys_updatereport.psp": compilation failed with the
following errors.
ORA-06502: PL/SQL: numeric or value error: character string buffer too
small

<%@ plsql parameter="p_perskeysavailableat" type="VARCHAR2"
default="''"%>
This also compiles without a problem. The row
comp.faulttab.perskeysavailableat 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?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.