Home » SQL & PL/SQL » SQL & PL/SQL » What is the trouble for ORDIMAGE ?
What is the trouble for ORDIMAGE ? [message #37881] Tue, 05 March 2002 02:57 Go to next message
marcos
Messages: 8
Registered: March 2002
Junior Member
I work with oracle and I need store images, but when I execute a procedure with pl/sql it show an error.
See the script and the message:

DECLARE
Image ORDSYS.ORDImage;
ctx RAW(4000) :=NULL;
BEGIN
SELECT imgblob INTO image FROM imagem
WHERE imgcodigo = 56 for UPDATE;
Image.setSource('FILE','IMG','logohospital.gif');
Image.import(ctx);
Image.setProperties;
UPDATE imagem SET imgblob = Image WHERE imgcodigo = 56;
COMMIT;
END;

DECLARE
*
ERRO na linha 1:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "ORDSYS.ORDSOURCE", line 181
ORA-22288: file or LOB operation FILEOPEN failed
O sistema não pode localizar o arquivo especificado.
ORA-06512: at "ORDSYS.ORDIMG_PKG", line 485
ORA-06512: at "ORDSYS.ORDIMAGE", line 209
ORA-06512: at line 8

Thanks for your attention!

Marcos
Re: What is the trouble for ORDIMAGE ? [message #37883 is a reply to message #37881] Tue, 05 March 2002 03:38 Go to previous message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
have u created the directory?

i have not much idea about ORDIMAGE.

if u want to try another method, then here is an example

SQL> desc blobs
Name Null? Type
------------------------------- -------- ----
ID VARCHAR2(255)
BLOB_COL BLOB

create directory My_files as 'c:temp';

procedure insert_img as
f_lob bfile;
b_lob blob;
begin
insert into blobs values ( 'MyGif', empty_blob() )
return blob_col into b_lob;
f_lob := bfilename( 'MY_FILES', 'c:tempemail.gif' );
dbms_lob.fileopen(f_lob,dbms_lob.file_readonly);
dbms_lob.loadfromfile( b_lob, f_lob, dbms_lob.getlength(f_lob) );
dbms_lob.fileclose(f_lob);
commit;
end;
Previous Topic: insatall
Next Topic: Re: error from sql (win) prompt
Goto Forum:
  


Current Time: Wed Apr 24 20:04:00 CDT 2024