Connecting Tech Pros Worldwide Help | Site Map

Returning an Oracle generated GUID through an out parameter

Newbie
 
Join Date: May 2009
Location: Jefferson City, Missouri USA
Posts: 2
#1: May 14 '09
I am returning the following error when i try to pass an oracle generated GUID through an out parameter. Here is the following error message from SQL+ worksheet:

BEGIN Project.spm_DataInsertTest ( ' ', :out_PPLorgGUID, :out_SubNo); END;

*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 1

Below is the Test Stored Procedure code:

(
in_PPLorgGUID IN VARCHAR2,
out_SubNO OUT NUMBER,
out_PPLorgGUID OUT VARCHAR2
)
IS

pplGUID VARCHAR2(38);
subno NUMBER;
checksum NUMBER;
newsubno NUMBER;

BEGIN

SELECT Project.seq_SubNo.nextval INTO subno FROM dual;
SELECT Project.fnm_getchecksum(subno) INTO checksum FROM dual;
newsubno := subno || checksum;

-- SAVE contact and subscriber
SELECT sys_guid() INTO pplGUID FROM dual;
DBMS_OUTPUT.put_line (pplGUID);

out_SubNo := newsubno;
out_PPLorgGUID := RAWTOHEX(pplGUID);

RETURN;
end spm_DataInsertTest;

Any help would be greatly appreciated. thanks in advance for your time and insights.
Newbie
 
Join Date: May 2009
Location: Jefferson City, Missouri USA
Posts: 2
#2: May 14 '09

re: Returning an Oracle generated GUID through an out parameter


SOLVED!

the error was not in the stored procedure. It was how i was initilaizing the out parameters in the SQL+ worksheet command.
Reply

Tags
guid, oracle, pl/sql, return