Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Copying BLOBs in Oracle
Our application uses a stored procedure to copy BLOBS. The procedure,
pCopyReps, is provided below. When the BLOB contains image data that exceeds
perhaps 32kbytes, the copy is made but only about the first 2kbyes of data
are actually copied. When we manually invoke the procedure from Oracle's SQL
Worksheet, no error message is given when Oracle V7 is used; with Oracle V8,
the following error is given:
SQLWKS> Execute pCopyReps(261,462)
ORA-06502: PL/SQL: numeric or value error ORA-06512: at "WEBPDM.PCOPYREPS", line 13 ORA-06512: at line 2
CREATE OR REPLACE PROCEDURE pCopyPrints (p_LngOldImageId INTEGER,
p_LngNewImageId INTEGER) AS
BEGIN
DECLARE
v_ImgSize INTEGER; v_ImgBLOB LONG RAW;
BEGIN
SELECT ImageSize, ImageBLOB
INTO v_ImgSize, v_ImgBLOB
FROM PPFPrints
WHERE ImageSerialNumber = p_LngOldImageId;
INSERT INTO PPFPrints (ImageSerialNumber, ImageSize, ImageBLOB) VALUES (p_LngNewImageId, v_ImgSize, v_ImgBLOB);
END;
END pCopyPrints;
/
Received on Wed Mar 17 1999 - 16:09:12 CST
![]() |
![]() |