Home » SQL & PL/SQL » SQL & PL/SQL » What's wrong with this:PLS-00320 (ora 10g r2,win2003 64bit)
icon5.gif  What's wrong with this:PLS-00320 [message #305533] Tue, 11 March 2008 03:43 Go to next message
lzfhope
Messages: 67
Registered: July 2006
Member
hi,
I am a Newbie!
I came up against a question PLS-00230.
HERE IS THE SCRIPT:
declare 
     --Create or replace directory UCE_DIR  AS 'D:\UCEDATA\FILEDIR\';
      fileid   UTL_FILE.file_type;
      l_line   VARCHAR2 (32767);  
   BEGIN
     ---1)Test writing file
     -- this test is ok,and can write data to file tuser.txt     
    /*fileid := UTL_FILE.fopen ('UCE_DIR', 'TUSER.TXT', 'W'); 
    FOR emprec IN (SELECT RPAD(userid,12,' ') USERID,name UNAME FROM TUSER)
    LOOP
      UTL_FILE.put_line (fileid, emprec.userid||'    '||emprec.UNAME);
    END LOOP; 
    UTL_FILE.fclose (fileid);*/
    --2)Test Reading file ,read data from tuser.txt which written by the script upon.
    -- Problem here! Oracle prompt:PLS-00320:   the   declaration   of   the   type   of     
    -- this   expression   is  incomplete   or   malformed 
    fileid :=utl_file.file_open('UCE_DIR', 'TUSER.TXT', 'R');
    utl_file.fclose(fileid);          
   end;


Can you tell me why?
Thank you in advance!

Re: What's wrong with this:PLS-00320 [message #305535 is a reply to message #305533] Tue, 11 March 2008 03:51 Go to previous messageGo to next message
MarcS
Messages: 312
Registered: March 2007
Location: Antwerp
Senior Member
lzfhope wrote on Tue, 11 March 2008 09:43

   

    fileid := UTL_FILE.fopen ('UCE_DIR', 'TUSER.TXT', 'W'); 

    fileid :=utl_file.file_open('UCE_DIR', 'TUSER.TXT', 'R');





Have a good look at the two statements I've selected out of your code
Re: What's wrong with this:PLS-00320 [message #305538 is a reply to message #305535] Tue, 11 March 2008 04:10 Go to previous message
lzfhope
Messages: 67
Registered: July 2006
Member
THANK YOU. Razz Razz Razz
Previous Topic: update query
Next Topic: ORA-06511: PL/SQL: cursor already open
Goto Forum:
  


Current Time: Sun Dec 04 02:12:27 CST 2016

Total time taken to generate the page: 0.08139 seconds