Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Copying BLOBs in Oracle

Copying BLOBs in Oracle

From: Ron Gordon <RGordon_at_gtisd.com>
Date: Wed, 17 Mar 1999 16:09:12 -0600
Message-ID: <7cp96c$hnf$1@ffx2nh3.news.uu.net>


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

The line 13 points to the SELECT clause that includes the ImageBlob field. This could be a hint.
Here below is the procedure itself. Do you have any idea how to solve this issue?

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US