Hey all,
*** THIS ANSWERED THE ISSUE ***:
I must have missed that both a year ago and this morning before I posted. Apologies! I switched the NLS Length setting in SQL Developer preferences to CHAR, recompiled, and the API package works fine now!
ORIGINAL POST...
A strange error about a buffer being too small has happened again (happened a little over a year ago) in the INVENTORY_PART_IN_STOCK_API package.
I am needing to recompile that package for debug, and as soon as I do (no code changes whatsoever, just a recompile), any call to that package results in the error:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "BELL1APP.INVENTORY_PART_IN_STOCK_API", line 73
All parts of this API worked flawlessly up until now. Line 73 of the package body is this:
last_character_ CONSTANT VARCHAR2(1) := Database_SYS.Get_Last_Character;
When I saw that line I recalled this happening before. I changed the size of the VARCHAR2 to 2 – still errors. Upped it to 3, all errors stop and the package functions correctly. So now the line looks like this, and everything works:
last_character_ CONSTANT VARCHAR2(2) := Database_SYS.Get_Last_Character;
As I said, this happened a little over a year ago -- exact same thing in the same package. Never was able to figure out what happened. Our DEV environment (where this is happening) has been refreshed from PROD several times since then, so it must be the recompile that puts the package into a non-working state.
Can anyone shed some light on this? Appreciate any and all help!
Thanks,
Joe Kaufman