Home » SQL & PL/SQL » SQL & PL/SQL » ORA-06502: PL/SQL BLOB : invalid LOB locator specified: ORA-22275 (10gR2)
ORA-06502: PL/SQL BLOB : invalid LOB locator specified: ORA-22275 [message #543384] Tue, 14 February 2012 09:00 Go to next message
korian
Messages: 7
Registered: February 2012
Location: Bretagne
Junior Member
Hi,

I've this procedure in a package :
  PROCEDURE loadfromfile_blob_table(p_name VARCHAR2, p_id NUMBER) IS
    v_blob    BLOB;
    v_fichier BFILE := BFILENAME('BLOBDIR', p_name);
    v_taille  INTEGER := DBMS_LOB.LOBMAXSIZE;
    v_possrc  INTEGER := 1 ;
    v_posdst  INTEGER := 1 ;
    
  BEGIN
    SELECT ATTRIBUTS INTO v_blob FROM table WHERE ID = p_id FOR UPDATE;
    dbms_lob.fileopen(v_fichier, dbms_lob.file_readonly);
    dbms_lob.loadblobfromfile(v_blob, v_fichier, v_taille, v_possrc, v_posdst);
    COMMIT;
    dbms_lob.fileclose(v_fichier);
  END;

No problem of compilation.

But when i try to execute it :
WIND\wtadmin> exec PK_BLOB.loadfromfile_blob_table('table_635625305.blob',342392);
BEGIN PK_BLOB.loadfromfile_blob_table('table_635625305.blob',342392); END;

*
ERREUR à la ligne 1 :
ORA-06502: PL/SQL : erreur numérique ou erreur sur une valeur: invalid LOB locator specified: ORA-22275
ORA-06512: à "SYS.DBMS_LOB", ligne 655
ORA-06512: à "WTADMIN.PK_BLOB", ligne 13
ORA-06512: à ligne 1

WIND\wtadmin>

v_taille, v_possrc, v_posdst have the values that i found in Oracle documentation.

Where is my mistake ?
Thank you for help.
Re: ORA-06502: PL/SQL BLOB : invalid LOB locator specified: ORA-22275 [message #543387 is a reply to message #543384] Tue, 14 February 2012 09:07 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
22275, 00000, "invalid LOB locator specified"
// *Cause:  There are several causes:  (1) the LOB locator was never
//          initialized; (2) the locator is for a BFILE and the routine
//          expects a BLOB/CLOB/NCLOB locator; (3) the locator is for a
//          BLOB/CLOB/NCLOB and the routine expects a BFILE locator;
//          (4) trying to update the LOB in a trigger body -- LOBs in
//          trigger bodies are read only; (5) the locator is for a 
//          BFILE/BLOB and the routine expects a CLOB/NCLOB locator;
//          (6) the locator is for a CLOB/NCLOB and the routine expects 
//          a BFILE/BLOB locator;
// *Action: For (1), initialize the LOB locator by selecting into the locator
//          variable or by setting the LOB locator to empty.  For (2),(3),
//          (5) and (6)pass the correct type of locator into the routine.  
//          For (4), remove the trigger body code that updates the LOB value.
Re: ORA-06502: PL/SQL BLOB : invalid LOB locator specified: ORA-22275 [message #543391 is a reply to message #543387] Tue, 14 February 2012 09:24 Go to previous messageGo to next message
korian
Messages: 7
Registered: February 2012
Location: Bretagne
Junior Member
Thanks for this fast answer.
I've already read this documentation before i posted.
But i still don't understand my mistake, so i posted...

I have a procedure to read BLOB that works fine.
Re: ORA-06502: PL/SQL BLOB : invalid LOB locator specified: ORA-22275 [message #543395 is a reply to message #543391] Tue, 14 February 2012 10:19 Go to previous messageGo to next message
Michel Cadot
Messages: 68765
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
v_blob is set no where and used in "dbms_lob.loadblobfromfile" so the error.

Regards
Michel

[Updated on: Tue, 14 February 2012 10:20]

Report message to a moderator

Re: ORA-06502: PL/SQL BLOB : invalid LOB locator specified: ORA-22275 [message #543550 is a reply to message #543395] Wed, 15 February 2012 03:28 Go to previous messageGo to next message
korian
Messages: 7
Registered: February 2012
Location: Bretagne
Junior Member
Thanks for this answer.

I understand that i need to have a valid instance of blob.
I tried to set v_blob by several methods but nothing works.

my last try :
  PROCEDURE loadfromfile_blob_ar(p_name VARCHAR2, p_ida2a2 NUMBER) IS
    v_blob    BLOB;
    v_fichier BFILE := BFILENAME('BLOBDIR', p_name);
    v_taille  INTEGER := DBMS_LOB.LOBMAXSIZE;
    v_possrc  INTEGER := 1 ;
    v_posdst  INTEGER := 1 ;
    
  BEGIN
    DBMS_LOB.OPEN(v_blob, DBMS_LOB.LOB_READWRITE);
    -- SELECT attributs INTO v_blob FROM ar WHERE ida2a2 = p_ida2a2 FOR UPDATE;
    DBMS_LOB.FILEOPEN(v_fichier, DBMS_LOB.file_readonly);
    DBMS_LOB.LOADBLOBFROMFILE(v_blob, v_fichier, v_taille, v_possrc, v_posdst);
    UPDATE ar SET attributs = v_blob WHERE ida2a2 = p_ida2a2;
    COMMIT;
    DBMS_LOB.FILECLOSE(v_fichier);
  END;

I have understood too that i got to update after having loaded the blob.
But i still don't find a instruction to set v_blob.
No where in the examples i found (doc oracle include, like example lldblobf.sql), i have not identified the correct instruction.

Could you help me more, please ?

Regards.

Re: ORA-06502: PL/SQL BLOB : invalid LOB locator specified: ORA-22275 [message #543557 is a reply to message #543550] Wed, 15 February 2012 03:49 Go to previous messageGo to next message
Michel Cadot
Messages: 68765
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
v_blob := empty_blob;

Regards
Michel
Re: ORA-06502: PL/SQL BLOB : invalid LOB locator specified: ORA-22275 [message #543566 is a reply to message #543557] Wed, 15 February 2012 06:06 Go to previous messageGo to next message
korian
Messages: 7
Registered: February 2012
Location: Bretagne
Junior Member
Thanks you again for your help.

I tried but still had an error of locator for my variable : ERR ORA-22275 - Line DBMS_LOB.LOADBLOBFROMFILE(v_blob, v_fichier, v_taille, v_possrc, v_posdst);
  PROCEDURE loadfromfile_blob_ar(p_name VARCHAR2, p_ida2a2 NUMBER) IS
    v_blob    BLOB := EMPTY_BLOB();
    v_fichier BFILE   := BFILENAME('BLOBDIR', p_name);
    v_taille  INTEGER := DBMS_LOB.LOBMAXSIZE;
    v_possrc  INTEGER := 1 ;
    v_posdst  INTEGER := 1 ;
    
  BEGIN
    -- DBMS_LOB.OPEN(v_blob, DBMS_LOB.LOB_READWRITE);
    -- SELECT attributs INTO v_blob FROM ar WHERE ida2a2 = p_ida2a2 FOR UPDATE;
    DBMS_LOB.FILEOPEN(v_fichier, DBMS_LOB.file_readonly);
    DBMS_LOB.LOADBLOBFROMFILE(v_blob, v_fichier, v_taille, v_possrc, v_posdst);
    UPDATE ar SET attributs = v_blob WHERE ida2a2 = p_ida2a2;
    COMMIT;
    DBMS_LOB.FILECLOSE(v_fichier);
  END;


The error message quoted by Blackswann says that the error could be a mismatch BFILE/BLOB.
But i can't see where i'm wrong.

Any other idea ?

Regards.
Re: ORA-06502: PL/SQL BLOB : invalid LOB locator specified: ORA-22275 [message #543569 is a reply to message #543566] Wed, 15 February 2012 06:30 Go to previous messageGo to next message
Michel Cadot
Messages: 68765
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Use SQL*Plus and copy and paste your session, the WHOLE session.

Regards
Michel
Re: ORA-06502: PL/SQL BLOB : invalid LOB locator specified: ORA-22275 [message #543575 is a reply to message #543569] Wed, 15 February 2012 06:46 Go to previous messageGo to next message
korian
Messages: 7
Registered: February 2012
Location: Bretagne
Junior Member
WIND\wtadmin> exec PK_BLOB.loadfromfile_blob_ar('ar_635625305.blob',342392);
BEGIN PK_BLOB.loadfromfile_blob_ar('ar_635625305.blob',342392); END;

*
ERREUR à la ligne 1 :
ORA-22275: l'indicateur de localisation LOB indiqué n'est pas valide
ORA-06512: à "SYS.DBMS_LOB", ligne 655
ORA-06512: à "WTADMIN.PK_BLOB", ligne 15
ORA-06512: à ligne 1


WIND\wtadmin>

Do you want the whole code of the PK_BLOB ?

[Updated on: Wed, 15 February 2012 06:47]

Report message to a moderator

Re: ORA-06502: PL/SQL BLOB : invalid LOB locator specified: ORA-22275 [message #543577 is a reply to message #543575] Wed, 15 February 2012 07:16 Go to previous messageGo to next message
Michel Cadot
Messages: 68765
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Whole session means including function creation, I don't know which line is line 15; there are no line 15 in what you posted.

Regards
Michel
Re: ORA-06502: PL/SQL BLOB : invalid LOB locator specified: ORA-22275 [message #543583 is a reply to message #543577] Wed, 15 February 2012 07:51 Go to previous messageGo to next message
korian
Messages: 7
Registered: February 2012
Location: Bretagne
Junior Member
Sorry.

WIND\wtadmin> CREATE OR REPLACE PACKAGE BODY PK_BLOB IS
  2
  3    PROCEDURE loadfromfile_blob_ar(p_name VARCHAR2, p_ida2a2 NUMBER) IS
  4      v_blob    BLOB := EMPTY_BLOB();
  5      v_fichier BFILE   := BFILENAME('BLOBDIR', p_name);
  6      v_taille  INTEGER := DBMS_LOB.LOBMAXSIZE;
  7      v_possrc  INTEGER := 1 ;
  8      v_posdst  INTEGER := 1 ;
  9
 10    BEGIN
 11      -- DBMS_LOB.OPEN(v_blob, DBMS_LOB.LOB_READWRITE);
 12      -- SELECT attributs INTO v_blob FROM ar WHERE ida2a2 = p_ida2a2 FOR UPDATE;
 13      DBMS_LOB.FILEOPEN(v_fichier, DBMS_LOB.file_readonly);
 14      DBMS_LOB.LOADBLOBFROMFILE(v_blob, v_fichier, v_taille, v_possrc, v_posdst);
 15      UPDATE ar SET attributs = v_blob WHERE ida2a2 = p_ida2a2;
 16      COMMIT;
 17      DBMS_LOB.FILECLOSE(v_fichier);
 18    END;
 19
 20  /* Copie de tout ou partie d'un fichier externe dans un BLOB
 21
 22  DBMS_LOB.LOADBLOBFROMFILE (
 23  dest_lob IN OUT NOCOPY BLOB,
 24  src_bfile IN BFILE,
 25  amount IN INTEGER,
 26  dest_déplacement IN OUT INTEGER,
 27  src_déplacement IN OUT INTEGER)
 28
 29  les valeurs pour amount, dest_déplacement et src_déplacement sont exprimées en octets
 30
 31
 32
 33
 34      -- Chargement de l'image dans la colonne BLOB --
 35       If PC$Image is not null Then
 36          L$Bfile := BFILENAME( 'FICHIERS_IN', PC$Image );
 37          DBMS_LOB.FILEOPEN(L$Bfile, DBMS_LOB.file_readonly);
 38          DBMS_LOB.LOADBLOBFROMFILE(
 39                                    L$Blob,       -- BLOB de destination
 40                                    L$Bfile,      -- Pointeur de fichier en entrée
 41                                    LN$Len,       -- Nombre d'octets à lire
 42                                    LN$src_off,   -- Position source de départ
 43                                    LN$dst_off);  -- Position destination de départ
 44          DBMS_LOB.FILECLOSE(L$Bfile);
 45       End if ;  */
 46
 47
 48    PROCEDURE write_blob_ar(p_name VARCHAR2, p_ida2a2 NUMBER) IS
 49      v_file       UTL_FILE.file_type;
 50      v_repertoire VARCHAR2(512) := 'BLOBDIR';
 51      v_fichier    VARCHAR2(256) := p_name;
 52      v_buffer     RAW(32000);
 53      v_offset     PLS_INTEGER DEFAULT 1;
 54      v_taille     PLS_INTEGER;
 55      v_longueur   PLS_INTEGER;
 56      v_chunk      PLS_INTEGER;
 57      v_blob       BLOB;
 58    BEGIN
 59     -- On récupére le BLOB
 60      SELECT attributs INTO v_blob FROM ar WHERE ida2a2 = p_ida2a2;
 61      -- On l'ouvre en lecture afin de pouvoir le parser plus facilement
 62      DBMS_LOB.OPEN(v_blob, DBMS_LOB.LOB_READONLY);
 63      -- On regarde la taille de Chunk idéale
 64      v_chunk := DBMS_LOB.GETCHUNKSIZE(v_blob);
 65      -- On regarde sa longueur
 66      v_longueur := DBMS_LOB.GETLENGTH(v_blob);
 67      -- On crée le fichier sur le disque dur
 68      v_file     := UTL_FILE.fOPEN(v_repertoire, v_fichier, 'w', 32767);
 69      -- On ecrit dans le fichier tant que l'on a pas fait tout le BLOB
 70      WHILE v_offset < v_longueur LOOP
 71        IF v_longueur - (v_offset - 1) > v_chunk THEN
 72          v_taille := v_chunk;
 73        ELSE
 74          v_taille := v_longueur - (v_offset - 1);
 75        END IF;
 76        v_buffer := NULL;
 77        -- On lit la partie du BLOB qui nous interesse
 78        DBMS_LOB.READ(v_blob, v_taille, v_offset, v_buffer);
 79        -- On ecrit cette partie dans le fichier
 80        UTL_FILE.PUT(file => v_file, buffer => utl_raw.cast_to_varchar2(v_buffer));
 81        UTL_FILE.FFLUSH(file => v_file);
 82        v_offset := v_offset + v_taille;
 83      END LOOP;
 84      -- On ferme le BLOB
 85      DBMS_LOB.CLOSE(v_blob);
 86      -- On ferme le fichier
 87      UTL_FILE.FCLOSE(v_file);
 88
 89      EXCEPTION
 90      WHEN OTHERS THEN
 91        IF DBMS_LOB.ISOPEN(v_blob) = 1 THEN
 92           DBMS_LOB.CLOSE(v_blob);
 93        END IF;
 94        IF UTL_FILE.is_OPEN(file => v_file) THEN
 95           UTL_FILE.FCLOSE(file => v_file);
 96        END IF;
 97    END write_blob_ar;
 98
 99    PROCEDURE write_blob_assignee(p_name VARCHAR2, p_ida2a2 NUMBER) IS
100      v_file       UTL_FILE.file_type;
101      v_repertoire VARCHAR2(512) := 'BLOBDIR';
102      v_fichier    VARCHAR2(256) := p_name;
103      v_buffer     RAW(32000);
104      v_offset     PLS_INTEGER DEFAULT 1;
105      v_taille     PLS_INTEGER;
106      v_longueur   PLS_INTEGER;
107      v_chunk      PLS_INTEGER;
108      v_blob       BLOB;
109    BEGIN
110     -- On récupére le BLOB
111      SELECT ASSIGNEE INTO v_blob FROM WFASSIGNMENT WHERE IDA2A2 = p_ida2a2;
112      -- On l'ouvre en lecture afin de pouvoir le parser plus facilement
113      DBMS_LOB.OPEN(v_blob, DBMS_LOB.LOB_READONLY);
114      -- On regarde la taille de Chunk idéale
115      v_chunk := DBMS_LOB.GETCHUNKSIZE(v_blob);
116      -- On regarde sa longueur
117      v_longueur := DBMS_LOB.GETLENGTH(v_blob);
118      -- On crée le fichier sur le disque dur
119      v_file     := UTL_FILE.fOPEN(v_repertoire, v_fichier, 'w', 32767);
120      -- On ecrit dans le fichier tant que l'on a pas fait tout le BLOB
121      WHILE v_offset < v_longueur LOOP
122        IF v_longueur - (v_offset - 1) > v_chunk THEN
123          v_taille := v_chunk;
124        ELSE
125          v_taille := v_longueur - (v_offset - 1);
126        END IF;
127        v_buffer := NULL;
128        -- On lit la partie du BLOB qui nous interesse
129        DBMS_LOB.READ(v_blob, v_taille, v_offset, v_buffer);
130        -- On ecrit cette partie dans le fichier
131        UTL_FILE.PUT(file => v_file, buffer => utl_raw.cast_to_varchar2(v_buffer));
132        UTL_FILE.FFLUSH(file => v_file);
133        v_offset := v_offset + v_taille;
134      END LOOP;
135      -- On ferme le BLOB
136      DBMS_LOB.CLOSE(v_blob);
137      -- On ferme le fichier
138      UTL_FILE.FCLOSE(v_file);
139
140      EXCEPTION
141      WHEN OTHERS THEN
142        IF DBMS_LOB.ISOPEN(v_blob) = 1 THEN
143           DBMS_LOB.CLOSE(v_blob);
144        END IF;
145        IF UTL_FILE.is_OPEN(file => v_file) THEN
146          UTL_FILE.FCLOSE(file => v_file);
147        END IF;
148    END write_blob_assignee;
149
150    PROCEDURE write_blob_principals(p_name VARCHAR2, p_ida2a2 NUMBER) IS
151      v_file       UTL_FILE.file_type;
152      v_repertoire VARCHAR2(512) := 'BLOBDIR';
153      v_fichier    VARCHAR2(256) := p_name;
154      v_buffer     RAW(32000);
155      v_offset     PLS_INTEGER DEFAULT 1;
156      v_taille     PLS_INTEGER;
157      v_longueur   PLS_INTEGER;
158      v_chunk      PLS_INTEGER;
159      v_blob       BLOB;
160    BEGIN
161     -- On récupére le BLOB
162      SELECT PRINCIPALS INTO v_blob FROM WFASSIGNMENT WHERE IDA2A2 = p_ida2a2;
163      -- On l'ouvre en lecture afin de pouvoir le parser plus facilement
164      DBMS_LOB.OPEN(v_blob, DBMS_LOB.LOB_READONLY);
165      -- On regarde la taille de Chunk idéale
166      v_chunk := DBMS_LOB.GETCHUNKSIZE(v_blob);
167      -- On regarde sa longueur
168      v_longueur := DBMS_LOB.GETLENGTH(v_blob);
169      -- On crée le fichier sur le disque dur
170      v_file     := UTL_FILE.fOPEN(v_repertoire, v_fichier, 'w', 32767);
171      -- On ecrit dans le fichier tant que l'on a pas fait tout le BLOB
172      WHILE v_offset < v_longueur LOOP
173        IF v_longueur - (v_offset - 1) > v_chunk THEN
174          v_taille := v_chunk;
175        ELSE
176          v_taille := v_longueur - (v_offset - 1);
177        END IF;
178        v_buffer := NULL;
179        -- On lit la partie du BLOB qui nous interesse
180        DBMS_LOB.READ(v_blob, v_taille, v_offset, v_buffer);
181        -- On ecrit cette partie dans le fichier
182        UTL_FILE.PUT(file => v_file, buffer => utl_raw.cast_to_varchar2(v_buffer));
183        UTL_FILE.FFLUSH(file => v_file);
184        v_offset := v_offset + v_taille;
185      END LOOP;
186      -- On ferme le BLOB
187      DBMS_LOB.CLOSE(v_blob);
188      -- On ferme le fichier
189      UTL_FILE.FCLOSE(v_file);
190
191      EXCEPTION
192      WHEN OTHERS THEN
193        IF DBMS_LOB.ISOPEN(v_blob) = 1 THEN
194           DBMS_LOB.CLOSE(v_blob);
195        END IF;
196        IF UTL_FILE.is_OPEN(file => v_file) THEN
197          UTL_FILE.FCLOSE(file => v_file);
198        END IF;
199    END write_blob_principals;
200
201  /*
202    PROCEDURE write_blob_sql(p_name VARCHAR2, p_sqlid VARCHAR2) IS
203      v_file       UTL_FILE.file_type;
204      v_repertoire VARCHAR2(512) := 'BLOBDIR';
205      v_fichier    VARCHAR2(256) := p_name;
206      v_buffer     RAW(32000);
207      v_offset     PLS_INTEGER DEFAULT 1;
208      v_taille     PLS_INTEGER;
209      v_longueur   PLS_INTEGER;
210      v_chunk      PLS_INTEGER;
211      v_blob       CLOB;
212    BEGIN
213     -- On récupére le BLOB
214      SELECT SQL_FULLTEXT INTO v_blob FROM V$SQL WHERE SQL_ID = p_sqlid;
215      -- On l'ouvre en lecture afin de pouvoir le parser plus facilement
216      DBMS_LOB.OPEN(v_blob, DBMS_LOB.LOB_READONLY);
217      -- On regarde la taille de Chunk idéale
218      v_chunk := DBMS_LOB.GETCHUNKSIZE(v_blob);
219      -- On regarde sa longueur
220      v_longueur := DBMS_LOB.GETLENGTH(v_blob);
221      -- On crée le fichier sur le disque dur
222      v_file     := UTL_FILE.fOPEN(v_repertoire, v_fichier, 'w', 32767);
223      -- On ecrit dans le fichier tant que l'on a pas fait tout le BLOB
224      WHILE v_offset < v_longueur LOOP
225        IF v_longueur - (v_offset - 1) > v_chunk THEN
226          v_taille := v_chunk;
227        ELSE
228          v_taille := v_longueur - (v_offset - 1);
229        END IF;
230        v_buffer := NULL;
231        -- On lit la partie du BLOB qui nous interesse
232        DBMS_LOB.READ(v_blob, v_taille, v_offset, v_buffer);
233        -- On ecrit cette partie dans le fichier
234        UTL_FILE.PUT(file => v_file, buffer => utl_raw.cast_to_varchar2(v_buffer));
235        UTL_FILE.FFLUSH(file => v_file);
236        v_offset := v_offset + v_taille;
237      END LOOP;
238      -- On ferme le BLOB
239      DBMS_LOB.CLOSE(v_blob);
240      -- On ferme le fichier
241      UTL_FILE.FCLOSE(v_file);
242
243      EXCEPTION
244      WHEN OTHERS THEN
245        IF DBMS_LOB.ISOPEN(v_blob) = 1 THEN
246           DBMS_LOB.CLOSE(v_blob);
247        END IF;
248        IF UTL_FILE.is_OPEN(file => v_file) THEN
249          UTL_FILE.FCLOSE(file => v_file);
250        END IF;
251    END write_blob_sql;
252   */
253
254  END PK_BLOB;
255  /

Corps de package crÚÚ.

WIND\wtadmin>
WIND\wtadmin> show error;
Pas d'erreur.
WIND\wtadmin> /

WIND\wtadmin> desc ar
 Nom                                                                      NULL ?   Type
 ------------------------------------------------------------------------ -------- -------------------------------------------------
 IDA2A2                                                                   NOT NULL NUMBER
 ATTRIBUTS                                                                         BLOB
Re: ORA-06502: PL/SQL BLOB : invalid LOB locator specified: ORA-22275 [message #543585 is a reply to message #543583] Wed, 15 February 2012 08:15 Go to previous messageGo to next message
Michel Cadot
Messages: 68765
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Keep your lines of code in 80 character width: no more than 80 characters on each line.

So line 15 is on update and NOT on dbms_lob.
Before you can do an update you have to initialize the column.

The function should be something like (check the syntax I can't do it):
PROCEDURE loadfromfile_blob_ar(p_name VARCHAR2, p_ida2a2 NUMBER) IS
    v_blob    BLOB;
    v_fichier BFILE   := BFILENAME('BLOBDIR', p_name);
    v_taille  INTEGER := DBMS_LOB.LOBMAXSIZE;
    v_possrc  INTEGER := 1 ;
    v_posdst  INTEGER := 1 ;
BEGIN
    -- Initialize the column
    UPDATE ar SET attributs = empty_blob() WHERE ida2a2 = p_ida2a2 
      returning attributs into v_blob;
    DBMS_LOB.FILEOPEN(v_fichier, DBMS_LOB.file_readonly);
    DBMS_LOB.LOADBLOBFROMFILE(v_blob, v_fichier, v_taille, v_possrc, v_posdst);
    -- Update the column
    UPDATE ar SET attributs = v_blob WHERE ida2a2 = p_ida2a2;
    COMMIT;
    DBMS_LOB.FILECLOSE(v_fichier);
END;

Regards
Michel
Re: ORA-06502: PL/SQL BLOB : invalid LOB locator specified: ORA-22275 [message #543586 is a reply to message #543585] Wed, 15 February 2012 08:27 Go to previous message
korian
Messages: 7
Registered: February 2012
Location: Bretagne
Junior Member
It works !

A huge "thanks you" for your help and your patience with me.

PS : Vive la france Wink et la bretagne Very Happy
Previous Topic: Create duplicate partition table
Next Topic: Correct Code? And Error ora-06575 Package or Function In Invalid State(2Merged)
Goto Forum:
  


Current Time: Sat Aug 09 14:01:27 CDT 2025