Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2013
    Posts
    10

    Unanswered: Errors when using UTL.FILE variable

    Hallo everybody i have a small problem when i will using the UTL.File viriables
    My code:

    CREATE OR REPLACE PROCEDURE SYSTEM.READ_FILE () AS
    s VARCHAR2(200);
    fHandle UTL_FILE.FILE_TYPE;
    text VARCHAR2(1000);
    c number:=0;
    BEGIN
    c:=10;
    OPEN mycursor FOR SELECT 10 FROM dual;
    END;

    My netbeans highlite me the procedure and says that the procedure has errors.
    If i remove the line:
    fHandle UTL_FILE.FILE_TYPE;

    then is all ok.

    Has somebody any idea?

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    in PL/SQL all variables must be declared before being used.

    what datatype is "mycursor"?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Also why do you have

    fHandle UTL_FILE.FILE_TYPE;

    in your procedure, your not doing any utl_file operations and besides not being defined, why open a cursor then throw it away because your not returning it to anything?
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •