Hi,
Just wondering if anyone would know why the below problem would be occuring??
We have a table which holds a BLOB column which we use to store word documents. Now there is a stored proc which reads this blob using
DBMS_LOB.READ (rec_letter.letter_file, l_amount, l_pos, l_buffer);
where rec_letter is a cursor and letter_file is the column
also in the stored proc the other variables have been set as follows
line_size CONSTANT BINARY_INTEGER := 16383;
l_buffer RAW (32767);
l_amount BINARY_INTEGER := line_size;
l_pos INTEGER := 1;
Now we just upgraded from Oracle9i to Oracle10g and under Oracle9i it worked fine but under 10g it errors with the following error message
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
This was erroring on l_buffer variable. Did some debug and the its length was 65534 which is now doubled. Does anyone know this would be occuring in 10G. If reduce the l_amount size to 16383(32767/2-1) then it works.
Could this be due to the character_set of the database?? Is it writing out as 2 byte char?? Or is this another problem entirely?
Any help would be great.
Thanks
Anthony
Just wondering if anyone would know why the below problem would be occuring??
We have a table which holds a BLOB column which we use to store word documents. Now there is a stored proc which reads this blob using
DBMS_LOB.READ (rec_letter.letter_file, l_amount, l_pos, l_buffer);
where rec_letter is a cursor and letter_file is the column
also in the stored proc the other variables have been set as follows
line_size CONSTANT BINARY_INTEGER := 16383;
l_buffer RAW (32767);
l_amount BINARY_INTEGER := line_size;
l_pos INTEGER := 1;
Now we just upgraded from Oracle9i to Oracle10g and under Oracle9i it worked fine but under 10g it errors with the following error message
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
This was erroring on l_buffer variable. Did some debug and the its length was 65534 which is now doubled. Does anyone know this would be occuring in 10G. If reduce the l_amount size to 16383(32767/2-1) then it works.
Could this be due to the character_set of the database?? Is it writing out as 2 byte char?? Or is this another problem entirely?
Any help would be great.
Thanks
Anthony