Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Way of dynamically creating Directory Objects within stored procedures

Status
Not open for further replies.

tryma

Programmer
Apr 28, 2003
1
NO
Hello,

I've been attempting to write an import utility to run through all records I've got in a table (roughly 90,000 rows) which hold metadata about images/media files, etc. The system used to store the files on disk before so included in the metadata is information such as directory on disk where the file is stored, and the filename corresponding to the object. I.e. an object with name (1st column of table) 'Me' could have metadata for directory (2nd column of table) '/web/folder/pics' and filename (3rd column of table) 'me.jpg' (just an example of type of metadata is stored in different columns of the table in question).
What I need to do is iterate through this table, build the directory of the physical file on each iteration and read the physical file into a BFile (using BFileOpen(...) ) before storing it in a new column I've added to the same table which is of type BLOB.

I'm using the DBMS_LOB package in the stored procedure I've written to perform this job, but I just cannot find out if it's possible to create/replace a directory object somehow inside the stored procedure so that I may re-use the same Directory Object by only changing the value of directory_path column per iteration.

Hope it came out clear enough, please say so if I need to elaborate. Any tips are received with lots of gratitude as this problem's been bugging me for quite some time now.

/trym
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top