If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Oracle 8.1.7 BFILENAME and CREATE DIRECTORY

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-27-03, 05:19
ronanvanriet ronanvanriet is offline
Registered User
 
Join Date: Dec 2003
Posts: 4
Oracle 8.1.7 BFILENAME and CREATE DIRECTORY

Hello,

I have written a SP to store a GIF in an Oracle BLOB column.

When I execute the SP, the returned error is ORA-22285: non existing directory or file for FILEEXISTS.

In online documentation Ihave seen the statement

CREATE OR REPLACE DIRECTORY 'alias' as 'full directory'

How can CREATE OR REPLACE DIRECTORY be used in a SP?

Kind regards,
Ronan van Riet
Reply With Quote
  #2 (permalink)  
Old 12-28-03, 20:22
kondaoracle kondaoracle is offline
Registered User
 
Join Date: Sep 2003
Posts: 33
RE:

Mr. Ronan,
Your query is not clear to me. Though try to get something from following lines.

To store your gif you must have to specify a file name and the path where it resides..right...So to specify a directory Oracle 9.1 supports "CREATE OR REPLACE DIRECTORY AS DIRECTOY NAME" command, but if u use 8.1.7 you dont have this facility as per my knowledge. Moreover u need to edit init.ora file and add an entry like this at the end:

utl_file_dir=* or
utl_file_dir=The directory where your gif exists

Then u need to restart the instance.
Or if you wanna use this "create directory" statement in SP u must have to go for oracle9.1.0 or higher. OR
Type the command at sql prompt..so that dir wil b created and give proper permissions..

Hope it cud help you....
Reply With Quote
  #3 (permalink)  
Old 12-29-03, 15:35
joebednarz joebednarz is offline
Registered User
 
Join Date: Dec 2003
Location: Oklahoma, USA
Posts: 354
Agreed. Please provide more information. However, one of the most common problems I've found when doing BFILE or BLOB stuff, is that the directory specification in your BLOB access function is not capitalized. For instance:

Code:
image.setsource ('file', 'IMG_DIR', img_p);
image.import (ctx);
Good luck.

JoeB
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On