How To Read File Path In Oracle

NiceMan331
NiceMan331 used Ask the Experts™
on
hi
i have oracle form 6i
i want to lookup in a specific directory if a file found or not ( any file , such xls . jpg , txt , mdb ,, etc
what is the suitable code for it ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Distinguished Expert 2018
Commented:
The code you had in your other question: http://www.experts-exchange.com/Database/Oracle/Q_28683736.html

Shou0ld work.  You just need to work with your DBA to properly set UTL_FILE_DIR or a better solution depending on your Oracle Database Version is to use Oracle Directories:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_5007.htm#SQLRF01207

Author

Commented:
all my problems is i don't have good touch with our DBA
if any thing i can do myself on my cleint is ok
on the server , they are not happy to take an advice from any other persons

Author

Commented:
but any how , i would like to understand it
what is the meaning of create directory ?
it says in the document :
A directory object specifies an alias for a directory on the server file
is it means , if i have a file path on my operation system for example :
c:\document\myfile.xls
the create directory , what for example will make it ?
and , should create directory for all paths on operation systems ?
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Most Valuable Expert 2012
Distinguished Expert 2018

Commented:
The Oracle Directory is a point to an Operating System folder.  It is more secure than the old UTL_FILE_DIR spfile/spfile parameter.

There is an example in the doc link I posted.  There are also examples in the docs for using UTL_FILE and Oracle Directory objects.
Database Administrator
Commented:
"A directory object specifies an alias for a directory on the server file [system]."

Note that this directory is on the SERVER's file system, and NOT on your local PC's hard drive.  If your database server runs a version of Windows server software, then it may have a directory like: "c:\document".  But no, you cannot use either a logical directory (that can be created with a "create directory..." command) or a physical directory (that must be specified in the UTL_FILE_DIR initialization parameter for the database) for a file on your local PC.

Oracle Forms6 includes a supplied PL\SQL package named: text_io that *CAN* use local files on your PC, but only *IF* you are running Forms6 in client/server mode.

Author

Commented:
Markger , I'm using oracle forms 6i , but I'm a cleint , connecting another server database , also I already installed oracle 11 g on my PC , but my work is on the database on a server , and I need to look for a file if found on my PC or not ( which is images stored in my PC )

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial