Oracle - Error al cargar una imagen desde directorio

 
Vista:
sin imagen de perfil

Error al cargar una imagen desde directorio

Publicado por Nelson (1 intervención) el 22/06/2022 00:11:38
Buenas tardes. TEngo el siguiente problema. Estoy tratando de cargar una imagen para almacenarla en un tabla para el campo tipo BLOB. Pero me genera error: Este es el codigo:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
DECLARE
 
    V_TEMP BLOB;
    V_BFILE BFILE;
    V_NOMBRE_FOTO VARCHAR2(20);
BEGIN
 
    V_NOMBRE_FOTO := '1.PNG';
    V_BFILE := BFILENAME('NELSON_OBJ', V_NOMBRE_FOTO);
    DBMS_LOB.OPEN(V_BFILE, DBMS_LOB.LOB_READONLY);
    DBMS_LOB.LOADFROMFILE(V_TEMP, V_BFILE, 100000);
    DBMS_LOB.CLOSE(V_BFILE);
 
    INSERT INTO FOTOS_EMPLEADOS VALUES (1, 1, 6, 'CR', 'FG', 'Foto1.jpg', '01,01,2022', 11, 'SG_RMYANETH', '01,01,2022', 'DESA29', 'MIGRACION', '01,01,2022', 'MIGRACION', V_TEMP, 'COMPRESION A FORMATO JPG' );
 
    COMMIT;
 
END;

y el error que genera es:

Informe de error -
ORA-22288: fallo de la operación de archivo o LOB FILEOPEN
El sistema no puede encontrar la ruta especificada.
ORA-06512: en "SYS.DBMS_LOB", línea 1014
ORA-06512: en línea 10
22288. 00000 - "file or LOB operation %s failed\n%s"
*Cause: The operation attempted on the file or LOB failed.
*Action: See the next error message in the error stack for more detailed
information. Also, verify that the file or LOB exists and that
the necessary privileges are set for the specified operation. If
the error still persists, report the error to the DBA.

Gracias de antemano
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder