Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: HTML and Oracle using UTL_FILE
Dave,
I recently had a similar problem trying to write to a file. I was going by the advice in O'Reiley's that states when you do an FOPEN and provide the path, you include the trailing delimiter (/ or \) depending if Unix or DOS based system. This is incorrect. If your init.ora file parameter UTL_FILE_DIR = /usr/tmp, then the path in FOPEN should also be '/usr/tmp' not '/usr/tmp/' as the book says.
Hope this answers the mail.
Mike Shoop
David F. Clipsham wrote:
>
> I am creating HTML with <-- Special Comments --> in it so that I can use
> PL/SQL to recognize the special comments and add database generated
> material. For example:
>
> <Body>
> <-- Insert Oracle Table Here -->
> </Body>
>
> So, I want to read this html file from a unix system with Oracle 7.3.2 using
> Oracle's UTL_FILE package. When the PL/SQL code sees the special comment in
> one of the lines it reads in, it replaces the comment with the results of a
> query.
>
> I have seen that it is necessary to have the location of any files used by
> UTL_FILE initialized in the init.ora file for the database instance, and I
> have done so. The problem is that I still get a trappable
> UTL_FILE.INVALID_PATH error every time I try to open my html file for
> reading using the FOPEN command.
>
> Can anyone shed any light on proper formatting of the necessary lines in the
> init.ora file? Is there something else that might be the problem?
>
> Thanks, Dave Clipsham
> dfclipsham_at_mindless.com
Received on Thu Mar 05 1998 - 00:00:00 CST
![]() |
![]() |