pgudur

pgudur id=
Role: Registered User (what's this?

Registered Users can edit pages, add images, and join discussions.

Read more about site and user permissions on this site at Wetpaint Central.

)
Member since: Jul 23 2009, 10:40 PM EDT
Friends: 1
Compliments: None


This member has not added to their profile yet.

Send them a message to ask them to update it.


Latest page update: Jul 23 2009, 10:40 PM EDT
Started By Thread Subject Replies Last Post
pgudur Help me!! error in inserting pictures into table 0 Jul 23 2009, 10:53 PM EDT by pgudur
pgudur
Thread started: Jul 23 2009, 10:53 PM EDT  Watch
Hi,
I am unable to rectify this error, please help me

I appreciate if any

using (schema) apps

where i am doing wrong, I am unable to understand
Please........

SQL> create or replace directory photos as 'c:\myfiles';

Directory created.

SQL> commit;

Commit complete.

SQL> --created procedure to insert into the table sh_photo--
SQL> CREATE OR REPLACE procedure insert_img
2 (p_catalogn number,p_photo varchar2)
3 as
4 f_photo bfile;
5 b_photo blob;
6 begin
7 update sh_photo set picture=empty_blob()
8 where catalogn=p_catalogn
9 return picture into b_photo;
10 f_photo := bfilename('photos',p_photo);
11 dbms_lob.fileopen(f_photo,dbms_lob.file_readonly);
12 dbms_lob.loadfromfile(b_photo,f_photo,dbms_lob.getlength(f_photo));
13 dbms_lob.fileclose(f_photo);
14 commit;
15 end insert_img;
16 /

Procedure created.

SQL> commit;

Commit complete.

SQL> execute insert_img(1,'Animallandscape.jpeg');
BEGIN insert_img(1,'Animallandscape.jpeg'); END;

*
ERROR at line 1:
ORA-22285: non-existent directory or file for FILEOPEN operation
ORA-06512: at "SYS.DBMS_LOB", line 504
ORA-06512: at "APPS.INSERT_IMG", line 11
ORA-06512: at line 1

Do you find this valuable?    

Friends (1)