Select new record in a txt file

Hello world
I have Forms 6i and I have the following procedure where I'm only putting the new record that I entered on the .txt file.
It is what I have so far, but the procedure always bringing all records and not only the new one I entered.

Get_file_contents PROCEDURE IS
Salida Varchar2 (1000);
Compañía Varchar2 (5);
Number of alert: = 0;
OUT_FILE Text_IO. Type_de_fichier;
nSchoolId Varchar2 (5);
nStudentId Varchar2 (15);
number of nDummy;
-in_file Text_IO. Type_de_fichier;
-linebuf Varchar2 (1000);

Function Abre_Archivo
Return boolean is

BEGIN
OUT_FILE: = Text_IO. Fopen(:file_name,'r');
Return (true);
exception
While others then
Return (false);
END;

BEGIN
go_block ('MY_TABLE');
clear_block (no_validate);
premier_enregistrement;
If Abre_Archivo then
OUT_FILE: = Text_IO. Fopen(:file_name,'r');
End if;
-Validation;

LOOP
Text_IO. Get_Line (OUT_FILE, Salida);
nSchoolId: = substr (Salida, 1, instr(Salida,';',1,1)-1);
nStudentId: = substr (Salida, instr(Salida,';',1,1) + 1, (instr(Salida,';',1,2)-instr(Salida,';',1,1))-1);
Verification - if algun record exists en the database
Select count (*)
in nDummy
From my_table
Where student_id = nStudentId;
If nDummy = 0 Then
: MY_TABLE. SCHOOL_ID: = substr (Salida, 1, instr(Salida,',',1,1)-1);
: MY_TABLE. STUDENT_ID: is substr (Salida, instr(Salida,',',1,1) + 1, (instr(Salida,',',1,2)-instr(Salida,',',1,1))-1);.
: MY_TABLE. Name: = substr (Salida, instr(Salida,',',1,2) + 1, (instr(Salida,',',1,3))-(instr(Salida,',',1,2) + 1));
: MY_TABLE. First name: is substr (Salida, instr(Salida,',',1,3) (instr(Salida,',',1,4))-(instr(Salida,',',1,3) + 1) + 1);.
: MY_TABLE. RANK: is substr (Salida, instr(Salida,',',1,4) (instr(Salida,',',1,5))-(instr(Salida,',',1,4) + 1) + 1);.
: MY_TABLE. GENRE: is substr (Salida, instr(Salida,',',1,5) (instr(Salida,',',1,6))-(instr(Salida,',',1,5) + 1) + 1);.
: MY_TABLE. STATUS: is substr (Salida, instr(Salida,',',1,6) + 1);.
-: MY_TABLE. STATUS: = 'A ';

next_record;
End if;
Synchronize;
END LOOP;

Text_IO. Fclose (OUT_FILE);
premier_enregistrement;
Exception when No_Data_Found then
delete_record;
Text_IO. Fclose (OUT_FILE);
premier_enregistrement;
END;

It seems that your select returns no records. The student card that extract you the string is incorrect. Put a message after your selection to show the value of nDummy.

Tags: Oracle Development

Similar Questions

  • Inserting data in a txt file

    Hello world
    I created a form in 6i where I can open a .txt file to show me all the data in this file, so after the display of data in my form, I press a button and I insert data in my database, but if I add new data to this .txt file when I press record it says that certain values are already inserted and they cannot be repeated , because the id is not null, so what I want to ask you is how can I modify the same program to make me insert values that are not already inserted. Only new data.
    This is my code:
    Get_file_contents PROCEDURE IS
    Salida Varchar2 (1000);
    Compañía Varchar2 (5);
    Number of alert: = 0;
    OUT_FILE Text_IO. Type_de_fichier;
    -in_file Text_IO. Type_de_fichier;
    -linebuf Varchar2 (1000);

    Function Abre_Archivo
    Return boolean is

    BEGIN
    OUT_FILE: = Text_IO. Fopen(:file_name,'r');
    Return (true);
    exception
    While others then
    Return (false);
    END;

    BEGIN
    go_block ('MY_BLOCK');
    clear_block (no_validate);
    premier_enregistrement;
    If Abre_Archivo then
    OUT_FILE: = Text_IO. Fopen(:file_name,'r');
    End if;
    -Validation;

    LOOP
    Text_IO. Get_Line (OUT_FILE, Salida);
    : MY_BLOCK. SCHOOL_ID: = substr (Salida, 1, instr(Salida,',',1,1)-1);
    : MY_BLOCK. CLASS_ID: is substr (Salida, instr(Salida,',',1,1) + 1, (instr(Salida,',',1,2)-instr(Salida,',',1,1))-1);.
    : MY_BLOCK. Class_name: = substr (Salida, instr(Salida,',',1,2) + 1);
    : MY_BLOCK. STATUS: = 'A ';

    next_record;
    Synchronize;
    END LOOP;

    Text_IO. Fclose (OUT_FILE);
    premier_enregistrement;
    Exception when No_Data_Found then
    delete_record;
    Text_IO. Fclose (OUT_FILE);
    premier_enregistrement;
    END;

    OK, the constraint is the id of class only. So adjust the WHERE condition so that it only checks the class id.

  • Add the new hard drive in a txt file

    Hello

    I have list of virtual machines under 'cluster1' and there are specific VMs on a txt file and add thin secondary 10 GB to those virtual machines.

    New disks will be created in the data store: DATASTORE1

    Cluster_name: Cluster1

    Can you help me on this. Thank you.

    Get-Content C:\VMs.txt | %{
      $Cluster = Get-VM -Name $_ | Get-Cluster | Select -ExpandProperty Name
      $dsname = "DATASTORE1"
        }
    
      New-HardDisk -VM $_ -CapacityGB 10 -DiskType Flat -Datastore $dsname -StorageFormat Thin
    }
    
    

    Try like this

    Get-Content C:\VMs.txt | %{

    Get-VM-name $_.

    New-hard disk - CapacityGB 10 - flat DiskType - data store "DATASTORE1" - StorageFormat thin

    }

    If the TXT file contains all the names of virtual machine, there is no need for the cluster.

  • My PC crashed. Restored on a new record and a new installation of FireFox. I can still access all the files. How do I take the old bookmarks if there is no backup?

    My PC crashed. Restored on a new record and a new installation of FireFox. I can still access all the files on the old drive. How do I take the old bookmarks if no backup exists, or has been completed? Does not save bookmarks of FireFox auto? If, then what is the file name and where is normally stored by FireFox?

    In fact, it can be easier...

    If you have the old drive connected as, say, drive E, go to:

    E:\Users\username
    

    Then click in the address bar and paste it after this and press ENTER to open it:

    \AppData\Roaming\Mozilla\Firefox\Profiles
    

    Normally, you have only one file, which has a random string followed by "default." In this case, click on this file and find the subfolder bookmarkbackups.

    If you find multiple profile folders, look inside to find the most recently updated backups.

    To restore the backup files, see: restore bookmarks from a backup or move them to another computer

  • Can BlackBerry 10 I create new simple text (TXT) file on 10 BB?

    Hello - I am using simple *. TXT files in the DropBox folder to create notes and sync with the computer in Linux (via DropBox).

    I can't find any method to create a new file to plain text (on sd card, dropbox,... file system folder). I can create document in the Docs To Go, but the document is saved as.doc (document ms).

    Edit and resave existing plain text (*.txt) files are pretty simple 'Docs To Go"(no problem).

    A tip?

    I don't see a way to do it. But I searched the text editor in BlackBerry World and got a lot of possibilities. Some look pretty good.

  • Cannot create a new illustration. Problems occurred during the recording of the print file.

    I can't open a new Illustrator file. He sends me this error: failed to create a new illustration. Problems occurred during the recording of the print file. ID:-1

    I opened a previous document created in CC, but it does not allow me to copy and paste items from one doc to another.

    I rebooted with nothing doesn't.

    System:

    Adobe Creative Cloud CC

    Mac Book Pro 2012

    2.6 GHz Intel Core i7

    8 GB 1600 MHz DDR3

    On a mac, but it seems that it has resolved itself. In my view, that it may have been a corrupted file that threw everything off. Thank you.

  • Result from a select in a txt file

    Hi all, any one can help me please, my question

    How the result of a SELECT statement (such as a select statement * of a dba_users) is set in a txt file?

    Thank you very much.

    Hello

    This is usually done by your front end tool.
    If your front end is SQL * Plus, you can say something like:

    SPOOL  d:\foo\bar\sales_report.txt
    ...
    SPOOL  OFF
    

    A copy of all the output that appears on your screen will enter the file named after the order of the COIL.

    For more information, search for "Control COIL" in the SQL * Plus Manual:
    http://download.Oracle.com/docs/CD/B28359_01/server.111/b31189/CH6.htm#sthref825

  • When adding new record create id data and the static information

    Hi, I have a tabe datbase like this:

    CREATE TABLE 'paper')
    'id_paper' INTEGER (11) NOT NULL AUTO_INCREMENT,
    'sample_url' varchar (50) COLLATE utf8_general_ci NOT NULL DEFAULT ",
    PRIMARY KEY ('id_paper')


    When I add the new record, I need the "sample_url" field to automatically add this information:

    images/15_sample.jpg.

    images - is subfolder where my pictures are stored
    15. is id_paper (primary news NuméroAuto ID)
    _sample.jpg - static and must be added.

    I use adobedeveloper Toolbox to generate code with minor changes, I'm no guru php either.

    I retrieve my data like this:

    SELECT
    Paper.ID_PAPER,
    Paper.sample_url,
    Concat ("< img src = images /', sample_url, ' ' ' width ="66"height ="174"/ >") AS sample
    Of
    paper

    I use this code to add fields:

    Add columns
    $ins_paper-> setTable ("paper");
    $ins_paper-> addColumn ("sample_url", "STRING_TYPE", "POST", "sample_url");
    $ins_paper-> setPrimaryKey ("id_paper", "NUMERIC_TYPE");

    It's php for the text box:

    < b >
    < class td = "KT_th" > < label for = "sample_url" > sample_url: < / label > < table >
    < td > < input type = "text" name = "sample_url" id = "sample_url" value = "<?" PHP echo KT_escapeAttribute ($row_rspaper ['sample_url']); ">" size = "32" / >
    <? PHP echo $tNGs-> displayFieldHint ("sample_url");? > <? PHP echo $tNGs-> displayFieldError ("paper", "sample_url");? > < table >
    < /tr >


    What should I change?

    I think in this line here:
    < td > < input type = "text" name = "sample_url" id = "sample_url" value = "<?" PHP echo KT_escapeAttribute ($row_rspaper ['sample_url']); ">" size = "32" / >
    I need to add php code to get the primary key ID and my static text too, but how?

    Hello

    Well the modified code is irrelevent at this stage. The custom trigger should do the trick. Test on my test server here it worked fine. So, something is missing. I was even going to the point of adding nothing to the sample_url field and he was always fill the db.

    It's my registerTriggers

    $ins_paper-> registerTrigger ('STARTER', "Trigger_Default_Starter", 1, "POST", "KT_Insert1");
    $ins_paper-> registerTrigger ("FRONT", "Trigger_Default_FormValidation", 10, $masterValidation);
    $ins_paper-> registerTrigger ("END", "Trigger_Default_Redirect", 99, "paper.php? done");
    $ins_paper-> registerTrigger ("AFTER", "Trigger_LinkTransactions", 98);
    $ins_paper-> registerTrigger ("ERROR", "Trigger_LinkTransactions", 98);
    $ins_paper-> registerTrigger ("AFTER", "Trigger_Custom", 50);

    Maybe you can post a txt file with the uninstall code?

    I really think at this point it's something small.

  • Frequency of change to txt file.

    Hi all

    I have a question about save text files. I'm using LabVIEW to automate a test bench and the oven that is used to run cyclic tests with up to 500 cycles at 1 hour each. I read and display of temperatures on my user interface in real rhyme (which was part of the specification of the interface) However, I would also like to record my readings in a .txt file.  I have been using the function "write to the file of the measurement.

    Now my problem is that for the time being, I save a lot of readings and my file size very quickly becomes very intense. I tried multi-object wait 1 second in my whole loop but it would give me again readings 1.8 million after 500 hours. Also, the wait function slows down the rest of my code and display in real time which is a bit annoying (especially if I want to get it down to save a reading every 30 seconds or more).

    Is it possible that I can change the frequency of the intervals during which I record the temperature without slowing down my real time display?

    Kind regards

    Daniel

    Use VI out of time. If a certain time elapsed, open a session.

    Of course, it will simply change the question of when to connect to how the newspaper (e.g., size of log files). If the test bench works for a long time, that the log file will simply to get more and more wide. You will probably need to check the size when you try to open a session, and if it is greater than a certain number (your choice, or set via a configuration file), you start a new.

  • multiple columns when the data connection to a txt file

    I am eager to write for different columns third example of a single txt file when recording data. Can someone show me examples of code how get 3 groups of data with several points, write them in their own columns and then go back and write more data points to the columns by adding the data... Please and thank you.

    Hi Tony,.

    Here's a basic example to do so.

    In newer versions of LV, you will find a 'write in the spreadsheet file' function which performs the task of the two functions to the right of the block diagram, but the version reported is more flexible IMHO because it allows to add easily the headers and footers...

  • Save the .txt file - works in a desktop not on device application

    Hello everyone. Im trying to save the text in a TextArea in a .txt file and have been able to do in a desktop Air application but cannot make it work for the BP. I made sure to make access_shared, the problem is in my code.

    private function saveFile():void
                {
                    if (currentFile) {
                        if (stream != null)
                        {
                            stream.close();
                        }
                        stream = new FileStream();
                        stream.openAsync(currentFile, FileMode.WRITE);
                        stream.addEventListener(IOErrorEvent.IO_ERROR, writeIOErrorHandler);
                        var str:String = mainTextField.text;
                        str = str.replace(/\r/g, "\n");
                        str = str.replace(/\n/g, File.lineEnding);
                        stream.writeUTFBytes(str);
    
                        stream.close();
                        dataChanged = false;
                    }
                    else
                    {
                        saveAs();
                    }
                }
    
    private function saveAs():void
                {
                    var fileChooser:File;
                    if (currentFile)
                    {
                        fileChooser = currentFile;
                    }
                    else
                    {
                        fileChooser = defaultDirectory;
                    }
                    fileChooser.browseForSave("Save As");
                    fileChooser.addEventListener(Event.SELECT, saveAsFileSelected);
                }
    
                private function saveAsFileSelected(event:Event):void
                {
                    currentFile = event.target as File;
                    saveFile();
                    dataChanged = false;
                    currentFile.removeEventListener(Event.SELECT, saveAsFileSelected);
                }
    

    I got the Save pop-up dialog box but nothing happens.

    Oops. turns out it was as simple as

    private function saveFile():void
                {
                    var fileRef:FileReference = new FileReference();
                    fileRef.save(mainTextField.text, "myfile.txt");
                }
    
  • question and random words game download of txt file.

    Hello. I have a simple txt file:

    Where is the Eiffel Tower? Paris

    King of musical instruments? o rgans

    What's my name? Harry potter

    I want this selection random flash issue and download on the text field Dynamics question «question»

    But for the answer, I have a greater task.

    In the library, I have video clips with names; b; c; d; e; f; g ;...

    After the issue, I want to flash to download the clip online:

    For example a question where is the Eiffel Tower?

    Response from PARIS

    Flash on a single line post film with the name 'p' 'a' 'r' 'i' "s".

    Maby someone has ideas? How the script should look? Sorry I'm new in AS3, but I think I will learn. I study every script that I got to know how ;) Thanks for your help

    the last error (on line 4, response) is not in my code.

    for the rest, it should be:

    kglad wrote:

    I assumed that you had to use an answers.txt separated with the nth line being the answer to the question.  If this is the case your code is set up to handle this:

    being part 1 code.

    var myLoader:URLLoader = new URLLoader();

    myLoader.load (new URLRequest ("questions.txt"));

    myLoader.addEventListener (Event.COMPLETE, questionsLoaded);

    var questionsArray:Array = new Array();

    var answersArray:Array = [];

    var randomArray:Array = [];

    var int index = 0;

    aContent var: String

    var aSplit:String;

    function questionsLoaded(event:Event):void {}

    myLoader.removeEventListener (Event.COMPLETE, questionsLoaded);

    myLoader.addEventListener (Event.COMPLETE, answersLoaded);

    myLoader.load (new URLRequest ("answers.txt"));

    Content = event.target.data;

    questionsArray = aContent.split ("\n");

    for (var i: int = 0; i<>

    randomArray.push (i);

    }

    Shuffle (randomArray);

    output. Text = questionsArray [randomArray [index]];

    the answer to this question will be answersArray [randomArray [index]];

    }

    function answersLoaded(event:Event):void {}

    Content = event.target.data;

    answersArray = aContent.split ("\n");

    }

    function shuffle(a:Array) {}

    var p:int;

    var t: *;

    var ivar:int;

    for (ivar =. Length-1; Ivar > = 0; Ivar-) {}

    p = Math.Floor ((Ivar+1) * Math.Random ());

    t = a [ivar];

    a [ivar] = a [p];

    a [p] = t;

    }

    }

    /////////////////////////// end frame 1 code ////////////////////////////////////

    in the keyframes for the questions ASKED:

    start the later framework code.

    index ++;

    output. Text = questionsArray [randomArray [index]];

    the answer to this question is answersArray [[index] randomArray];

    subsequent frame of the end of the code.

    and you can use a single file, but if you do this, you must use xml and not a text file.

  • create a txt file

    Hello


    I want to send 30 recordings with slider & for loop & UTL_FILE in txt file with 9. I can write all records in a single file.

    30 records == > 1-9 record 1 file

    10-18 2nd files

    18-27 3rd files

    27-30 4th records


    Is this possible?

    Here is an example. In the code below, the code highlighted in red will be your actual query that retrieves the data. He ROW_NO, FILE_NO and MAX_RNO are the values that I generated to create a separate file for each 9 entries.

    SQL > declare
    l_file 2 utl_file.file_type;
    3. start
    4 for i in)
    5 Select mod row_no (rownum-1: 9)
    6, ceil(rownum/9) file_no
    7, max (mod (rownum-1: 9)) on (ceil(rownum/9) partition) max_rno
    8, object_name
    object 9
    10 where rownum<=>
    11 order of 2, 1
    12             )
    loop 13
    14 if i.row_no = 0 then
    15 l_file: = utl_file.fopen
    16                   (
    17 "KARDIR.
    18                    , 'file_' || i.file_no | '_' || TO_CHAR (sysdate, 'ddmmyyyyhh24miss'). ".dat".
    19                    , 'a'
    20                   );
    21 end if;
    22
    23 utl_file.put_line (l_file, i.object_name);
    24
    25 if i.row_no = i.max_rno then
    26 utl_file.fclose (l_file);
    27 end if;
    28 end of loop;
    29 end;
    30.

    PL/SQL procedure successfully completed.

    % ls - lrt file_ knani * _ * .dat | AWK '{print $9} ' | XARGS wc-l
    9 file_1_08072013091853.dat
    9 file_2_08072013091853.dat
    9 file_3_08072013091853.dat
    3 file_4_08072013091853.dat
    total of 30

    knani %

  • Import text from a txt file.

    Hey guys,.

    I'm looking for a way to import text from a .txt file, but I'm totally lost. If someone could point me in the right direction would be great

    Hi Prails
    This script is basically what you asked:

    #target illustrator

    main #targetengine

    function copyText() {}

    text var file is File.openDialog ('select file');.

    If (! textFile.exists | app.documents.length == 0) {}

    return;

    };

    textFile.open ("r");

    var txtContent = textFile.read ();

    textFile.close ();

    var doc = app.activeDocument;

    var textItem = doc.textFrames.add ();

    textItem.contents = txtContent

    };

    copyText ();

    Basically what you need to do is to declare the text file, open, read and close it. Then, you create a new text element in the Illustrator document and write content once caught in the text element.

    You can continue to work with the variable 'textItem' in my example script if you want to set properties such as size, text color, position and so on. Also, if you wish, replace the first line of the function var textFile = new file ("" ~ / Desktop/Test.txt ' "); textFile var = File.openDialog ("select the file"); so the script opens a dialog box asks you the file you want to copy the content.

    Hope to be helped

    Best regards

    Gustavo

    Post edited by: Gustavo Del steep

  • Problems with downloading to a TXT file

    I have a procedure that when called creates a .txt file, which is used as a download to another application.
    If I run my procedure, the txt file is created, but when I look at the file, it contains the required records, but also information on the page.
    See below.

    My code is
    create or replace PROCEDURE mer_fuel_coupon_download_1 IS
      --
    
    CURSOR c_fuel_coupon IS
      
    SELECT A.VIN,
        A.FIRST_BFG,
        F.DRIVER_POSITION,
        A.BFG_NO,
        C.MAKES MAKE,
        D.MODEL,
        A.FRG_NO,
        E.COLOUR,
        A.MANUFACTURED_DATE MANUFACTURED,
        A.DEREG_ON,
        A.OTHER_VRN NON_BFG_REG_NO,
        B.VALID_FROM,
        B.VALID_UNTIL,
        'Not Held Anymore' UNREG_FROM,
        'Not Held Anymore' UNREG_TO,
        G.FUEL_TYPE,
        A.CC,
        A.FUEL_RATION,
        H.PERSONAL_NO,
        I.RANK,
        H.FIRST_NAME,
        H.SURNAME,
        'Not Held Anymore' HEAD_OF_FAMILY,
        J.UIN,
        TO_DATE(H.DATE_OF_BIRTH,'DD-MON-YY') DATE_OF_BIRTH,
        J.UNIT_NAME,
        K.BFPO,
       -- A.ITEM_ID
        ROWNUM
      FROM MER_IMPORTED_ITEMS A,
           MER_VEHICLE_OWNERSHIPS B, 
           MER_MAKES C, 
           MER_MODELS D,
           MER_COLOURS E,
           MER_DRIVER_POSITION F,
           MER_FUEL_TYPE G,
           MER_PERSONS H,
           MER_RANKS I,
           MER_UNITS J,
           MER_BFPO K
      WHERE H.PERSONAL_ID(+) = B.PERSONAL_ID 
      AND B.ITEM_ID(+) = A.ITEM_ID
      AND C.MAKE_ID(+) = A.MAKE_ID
      AND D.MODEL_ID(+) = A.MODEL_ID
      AND E.COLOUR_ID(+) = A.COLOUR_ID
      AND F.DRIVER_POSITION_ID(+) = A.DRIVER_POSITION_ID 
      AND G.FUEL_TYPE_ID(+) = A.FUEL_TYPE_ID
      AND I.RANK_ID(+) = H.RANK_ID
      AND J.UNIT_ID(+) = H.UNIT_ID
      AND K.BFPO_ID(+) = J.BFPO_ID
      AND A.BFG_NO IS NOT NULL
      AND (A.DEREG_ON IS NULL
      OR A.DEREG_ON    > (SYSDATE - 1826));
    
      --
      --
      line_of_data VARCHAR2(5000);
      --
      dir_prob         EXCEPTION;
      file_write_done  EXCEPTION;
        --
      record_ct        NUMBER(6) :=0;
      output_file      VARCHAR2(12) := 'FUEL.TXT';
      target_file      utl_file.File_Type;
      --
      success_ct       NUMBER(6) :=0;
      fail_ct          NUMBER(6) :=0;
    
    BEGIN
    -- Set MIME type
    owa_util.mime_header( 'application/octet', FALSE );
    -- Set name fo file
    htp.p('Content-Disposition: attachment; filename="FUEL.TXT"');
    -- Close the HTTP header
    owa_util.http_header_close;
    --
      --
    BEGIN
    FOR r_fuel IN c_fuel_coupon
        LOOP
         BEGIN
    line_of_data := r_FUEL.VIN||','
    ||TO_CHAR(r_FUEL.FIRST_BFG,'DD/MON/YY')||','
    ||r_FUEL.DRIVER_POSITION||','
    ||r_FUEL.BFG_NO||','
    ||r_FUEL.MAKE||','
    ||r_FUEL.MODEL||','
    ||r_FUEL.FRG_NO||','
    ||r_FUEL.COLOUR||','
    ||TO_CHAR(r_FUEL.MANUFACTURED,'DD/MON/YY')||','
    ||TO_CHAR(r_FUEL.DEREG_ON,'DD/MON/YY')||','
    ||r_FUEL.NON_BFG_REG_NO||','
    ||TO_CHAR(r_FUEL.VALID_FROM,'DD/MON/YY')||','
    ||TO_CHAR(r_FUEL.VALID_UNTIL,'DD/MON/YY')||','
    ||r_FUEL.UNREG_FROM||','
    ||r_FUEL.UNREG_TO||','
    ||r_FUEL.FUEL_TYPE||','
    ||r_FUEL.CC||','
    ||r_FUEL.FUEL_RATION||','
    ||r_FUEL.PERSONAL_NO||','
    ||r_FUEL.RANK||','
    ||r_FUEL.FIRST_NAME||','
    ||r_FUEL.SURNAME||','
    ||r_FUEL.HEAD_OF_FAMILY||','
    ||r_FUEL.UIN||','
    ||TO_CHAR(r_FUEL.DATE_OF_BIRTH,'DD/MON/YY')||','
    ||r_FUEL.UNIT_NAME||','
    ||r_FUEL.BFPO||','
    --||r_FUEL.ITEM_ID||','
    ||r_FUEL.ROWNUM||','
    || CHR(13)||CHR(10);
    
    --
    htp.prn(line_of_data);
    
    
    success_ct := success_ct + 1;
    
    EXCEPTION
    WHEN no_data_found THEN
              RAISE file_write_done;
            --
            WHEN others THEN
              fail_ct := fail_ct + 1;
     END;
        END LOOP;
    
    
    END;
    END;
    At the end of the txt file, I see information like this
    <head>
    <title>Fuel Coupon Download</title>
    <link rel="stylesheet" href="/i/themes/theme_20/theme_3_1.css" type="text/css" />
    <link rel="stylesheet" href="/i/bfg_css/j6.css" type="text/css" />
    <script type="text/javascript" src="/i/bfg_javascript/jquery/jquery-1.3.2.js"></script>
    <link rel="stylesheet" href="/i/bfg_javascript/jquery/jqueryui/themes/redmond/jquery-ui-1.7.2.custom.css" type="text/css" />
    <script type="text/javascript" src="/i/bfg_javascript/jquery/jqueryui/jquery-ui-1.7.2.custom.js"></script>
    <script type="text/javascript" src="/i/bfg_javascript/j6_javascript.js"></script>
    <!--[if IE]><link rel="stylesheet" href="/i/themes/theme_20/ie.css" type="text/css" /><![endif]-->
    <style>
    * {font-size: 10pt;font-family: Tahoma,Arial,Helvetica,Geneva,sans-serif};
    </style>
    
    <script src="/i/javascript/apex_ns_3_1.js" type="text/javascript"></script>
    <script src="/i/javascript/apex_3_1.js" type="text/javascript"></script>
    <script src="/i/javascript/apex_get_3_1.js" type="text/javascript"></script>
    <script src="/i/javascript/apex_builder.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    /*Global JS Variables*/
    var htmldb_Img_Dir = "/i/";
    //-->
    </script>
    <link rel="stylesheet" href="/i/css/apex_3_1.css" type="text/css" />
    <!--[if IE]><link rel="stylesheet" href="/i/css/apex_ie_3_1.css" type="text/css" /><![endif]-->
    
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    </head>
    <body ><form action="wwv_flow.accept" method="post" name="wwv_flow" id="wwvFlowForm">
      <input type="hidden" name="p_flow_id" value="111" id="pFlowId" />  <input type="hidden" name="p_flow_step_id" value="388" id="pFlowStepId" />  <input type="hidden" name="p_instance" value="1780009464230900" id="pInstance" />  <input type="hidden" name="p_page_submission_id" value="18077377520018" id="pPageSubmissionId" />  <input type="hidden" name="p_request" value="" id="pRequest" /><div id="t20PageHeader">
    <table border="0" cellpadding="0" cellspacing="0" summary="">
    <tr>
    <td id="t20Logo" valign="top"><span style="font-family:Arial; color:#FFFFFF; font-size:18px; white-space:nowrap; font-weight:bold;">Vehicle Licensing Office Application</span><br /></td>
    <td id="t20HeaderMiddle"  valign="top" width="100%"><br /></td>
    <td id="t20NavBar" valign="top"><br /></td>
    </tr>
    </table>
    </div>
    <div id="t20BreadCrumbsLeft"></div>
    <table border="0" cellpadding="0" cellspacing="0" summary="" id="t20PageBody"  width="100%" height="70%">
    <td width="100%" valign="top" height="100%" id="t20ContentBody">
    <div id="t20Messages"></div>
    <div id="t20ContentMiddle"></div>
    </td>
    <td valign="top" width="200" id="t20ContentRight"><br /></td>
    </tr>
    </table><table border="0" cellpadding="0" cellspacing="0" summary="" id="t20PageFooter" width="100%">
    <tr>
    <td id="t20Left" valign="top"><span id="t20UserPrompt">ADMIN</span><br /></td>
    <td id="t20Center" valign="top"></td>
    <td id="t20Right" valign="top"><span id="t20Customize"></span><br /></td>
    </tr>
    </table>
    <br class="t20Break"/>
    <input type="hidden" name="p_md5_checksum" value=""  /></form> 
    <script type="text/javascript">
    <!-- 
    
    //-->
    </script><!-- Code generated for user with developer privileges.  -->
    <script type="text/javascript">
    function popupInfo()
    {
      w = open("f?p=4000:34:1780009464230900:PAGE:NO:34:F4000_P34_SESSION,F4000_P34_FLOW,F4000_P34_PAGE:1780009464230900,111,388","winLov","Scrollbars=1,resizable=1,width=700,height=450");
      if (w.opener == null)
         w.opener = self;
         w.focus();
    }
    </script><table cellpadding="0" border="0" cellspacing="0" summary="Developer Toolbar" align="center"><tbody><tr><td><a class="htmldbToolbar" href="f?p=4500:1000:1780009464230900" style="border-left:1px solid black;" title="Application Express Home">Home</a></td><td><a class="htmldbToolbar" title="Application 111" href="f?p=4000:1:1780009464230900::NO:1,4150,RP:FB_FLOW_ID,FB_FLOW_PAGE_ID,F4000_P1_FLOW,F4000_P4150_GOTO_PAGE,F4000_P1_PAGE:111,388,111,388,388" style="border-left:1px solid #000000;border-right:1px solid #000000;">Application 111</a></td><td><a class="htmldbToolbar" title="Edit Page 388" href="f?p=4000:4150:1780009464230900::NO:1,4150:FB_FLOW_ID,FB_FLOW_PAGE_ID,F4000_P1_FLOW,F4000_P4150_GOTO_PAGE,F4000_P1_PAGE:111,388,111,388,388">Edit Page 388</a></td><td><a class="htmldbToolbar" href="f?p=4000:336:1780009464230900::::FB_FLOW_ID,FB_FLOW_PAGE_ID,F4000_P1_FLOW,F4000_P4150_GOTO_PAGE,F4000_P1_PAGE:111,388,111,388,388" style="border-left:1px solid black;" title="Create">Create</a></td><td><a class="htmldbToolbar" href="javascript:popupInfo()" style="border-left:1px solid black;" title="Session">Session</a></td><td><a class="htmldbToolbar" href="f?p=4000:14:1780009464230900::::FB_FLOW_ID,FB_FLOW_PAGE_ID,F4000_P1_FLOW,F4000_P4150_GOTO_PAGE,F4000_P1_PAGE:111,388,111,388,388" style="border-left:1px solid black;" title="Activity">Activity</a></td><td><a class="htmldbToolbar" title="Debug" style="border-left:1px solid black;" href="f?p=111:388:1780009464230900::YES">Debug</a></td><td id="hideEdit" style="display:none;"><a class="htmldbToolbar" title="Hide Edit Links" href="javascript:quickLinks('HIDE');"  style="border-right:1px solid #000000;border-left:1px solid black;">Hide Edit Links</a></td><td id="showEdit"><a class="htmldbToolbar" title="Show Edit Links" href="javascript:quickLinks('SHOW');"  style="border-right:1px solid #000000;border-left:1px solid #000000;">Show Edit Links</a></td></tr></tbody></table>
    <script type="text/javascript">
       if(GetCookie('ORA_WWV_QUICK_EDIT') != null){
           if(GetCookie('ORA_WWV_QUICK_EDIT') == 'SHOW')
               quickLinks('SHOW');
       }
    </script>
    </body>
    </html>
    Can someone tell me why it is marking this information on my txt file

    See you soon

    Gus

    Hello

    before the call to the exception handler

    apex_application.g_unrecoverable_error := true;
    

    Kind regards
    Jari

Maybe you are looking for