Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Webserver Output

Re: Webserver Output

From: System Manager <noone_at_ecotech.ab.ca>
Date: 1997/10/11
Message-ID: <61mnjn$ght@nr1.calgary.istar.net>#1/1

Dan,

The procedure is quite simple after you've done it once. . . You'll have to use the UTL_FILE package that shipped with the Webserver. Of course, like all of Oracle's tools, you have to install the package if you didn't do it during the install.

To write to disk use the 'open' command followed by a 'put_line' ... actual code from our feedback form is shown below.

It is important that your ORAxx.INI file has been appended to indicate which directories are allowed access from the Utl_file package...commands shown below.

Place in INITorcl.ORA (may differ) --> utl_file_dir = C:\dirpath1\dirpath2

Sample Code -->


      SaveToFile utl_file.file_type;
      FileName Varchar2(40);
      FileLoc Varchar2(40);
   Begin
      FileName := 'File'||to_char(sysdate,'DDHHMISS')||'.txt';   /*Create
name based on date/time */
      FileLoc := 'C:\dirpath1\dirpath2';     /*Directory must have been
previously declared in InitOrcl.ora/*
      SaveToFile := utl_file.fopen(FileLoc,FileName,'a');         /* The 'a'
indicates append /*
       utl_file.put_line(SaveToFile,'FILE CONTENTS....');        /* Insert
variables or loop to build list etc. */
       utl_file.fclose(SaveToFile);

   End;

Cheers. Received on Sat Oct 11 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US