Questio about TEXT_IO package

dear friends
I've created a procedure that copy the data from database like this:
PROCEDURE P_LOAD2TEXT(P_STOCK GN_STOCKS.STOCK_CODE%TYPE)
IS
CURSOR DAILY_TRADE_CUR IS
SELECT TO_CHAR(THE_TIME,'HH24:MI:SS') TRADE_TIME,PRICE,QTY
FROM LV_DAILY_TRADES
WHERE STOCK_CODE = P_STOCK;
     vFILE           TEXT_IO.FILE_TYPE;
     vFILENAME      VARCHAR2(255);
BEGIN
          Vfilename := 'X:\SE\chart\intraday_ascii\'||:trade.stock_code||'.txt';
          vFILE := TEXT_IO.FOPEN(vFILENAME ,'W');
          FOR I IN DAILY_TRADE_CUR LOOP
          TEXT_IO.PUT_LINE(vFILE,I.TRADE_TIME||','||I.PRICE||','||I.QTY);          
          END LOOP;
          TEXT_IO.FCLOSE(vFILE);
END;
the procedure works fine .
But i need to validated first if the file exists, delete this file first.
my question is
Is it possible to delete file from hard disk from within form builder?
I can tried to make a batch file that clears all files with in the folder but the problem is the the command prompt window is displyed and asking me the following question
x:\del*.*
x:\*.*, are you sure(Y,N)
and i must press Y to delete the files
my knowedge in making batch file is limited and i do not know how to pass 'Y' to the command prompt.
please help

There are two choices:
- Add the /q switch to the del command, i.e. del *.* /q
Or use the delete_file procedure from the win_api_utility package available from the d2kwutil library (if using Forms 6i).
Be carefull howver when using the del *.* to make sure you are in the proper folder.

Similar Messages

  • Create a file using text_io package

    Hi my friends,
    I would like to direct the output from my Reports to a file.
    I was searching in Oracle Forum and I found:
    1.in the before report trigger open a file(.txt file) for write mode using text_io.fopen. You can specify the file name with whatever path u want.
    2.Whatever fields from the report you want to redirect to the this file, go to the repeating frame of that field and use text_io.put or put_line.
    How to I could do this?????
    3.Finally , maybe in the after report or whereever close the file you opened using text_io.close.
    Someone, could give more information about this?
    Thanks...
    Carla

    Hi Carla
    What I understand from your words is that you want to write out a file based on your query in the report using the text_io package.
    You could be doing this in the Format Trigger of the appropriate Repeating Frame.
    You could also be using Delimited output and choose an appropriate delimiter character.
    With Reports 9i, you could be doing File I/O operations using Java calls by importing a Java class.
    Hope this helps.
    Regards
    Sripathy

  • Embedding images using the TEXT_IO package

    Good morning people,
    I'm in the process of converting one of my client's corporate reports to an Excel format, using the "TEXT_IO" package. The client requires his logo to appear in the Excel file (for a purely aesthetic purpose).
    I've tried - to no avail, might I add - to embed/insert the company's corporate logo into the generated Excel file. This logo is stored as a LONG RAW datatype in the associated JCG_EXCEL_DATA table.
    Whenever I attempt to embed this logo, using the "Text_IO.Putf" built-in, Excel displays it as "Bit!+".
    Do you perhaps know of a way to do this?
    Here's an example of the statement used:
    "Text_IO.Putf(out_file, chr(9) || :image_file);"
    Thanks and regards,
    Johann.

    Hi,
    It will not be possible to do it as it doesn't recognize it as an image.
    What about going for a delimiteddata output having the header with the logo.
    Please see the 6i patch 11 release notes on OTN documentation for Reports
    Thanks
    The Oracle Reports team

  • A question about creating packages as local objects in ABAP

    Hi,
    I have a question about creating packages with SE80. Whenever I create a new package it is assigned a new transport request. After that, I can create new programs inside this package, and each time I can choose whether to assign the new program to a transport request or just save it as a local object (I often do this for test programs that I don't transport and I remove them once my tests have been done).
    What I would like to ask is that, is it possible to create a package (and not just programs inside a given package) as a local object? so that every new object created in this package will be considered as a local object?
    Thanks in advane,
    Kind Regards,
    Dariyoosh

    Thomas Zloch wrote:
    Please also check the F1 help for the package field e.g. in SE80, SAP standard is in range A-S and U-X, namespaces start with "/", so you should be save. I am using the T namespace for temporary stuff since a long time and did not have a problem so far.
    > Thomas
    >
    > P.S. this applies to the package name only, of course
    Thank you very much for this remark, I checked F1 help for the package field and in fact as you mentioned these ranges are for local objects.
    Once again, thank you very much for your help.
    Kind Regards,
    Dariyoosh

  • Can't open pdf. files something about patch package

    Can't open PDF files something about patch package verification.error.

    I am having the same issue.  Unable to open ANYTHING related to adobe (PDF, downloads), as well as unable to delete and reinstall or even change or correct. 

  • Urgent request - TEXT_IO package

    Hi people,
    I'm in the process of converting one of my client's corporate reports to an Excel
    format, using the "TEXT_IO" package. The client requires his logo to appear in the
    Excel file (for a purely aesthetic purpose).
    I've tried - to no avail, might I add - to embed/insert the company's corporate
    logo into the generated Excel file. This logo is stored as a LONG RAW datatype in
    the associated JCG_EXCEL_DATA table.
    Whenever I attempt to embed this logo, using the "Text_IO.Putf" built-in, Excel
    displays it as "Bit!+".
    Do you perhaps know of a way to do this?
    Here's an example of the statement used:
    "Text_IO.Putf(out_file, chr(9) || :image_file);"
    Thanks and regards,
    Johann.

    Do you know the format of the file? If you've used Oracle*Forms to upload the file to the database then format may not be one recognised by Excel. You could check by saving the file to the filesystem and making sure you can insert it into Excel manually.

  • TEXT_IO package...

    Is there any restriction on the length of record that can be read from text file using text_io package. I want to read a text file that has number of records with length upto 20000 char. I'm putting this data into a table which has 4 columns of varchar2(4000).
    will this work properly?
    thanks much
    ---himanshu

    Check each line of the file for a ','. The heading line will not
    have any. Only insert data from lines that contain a ','.

  • Finding EOF using TEXT_IO package

    Hi everybody,
    I use TEXT_IO package and read all lines of a text file....
    How can the logic of the routine i write come out of the loop when the file ends..(EOF=TRUE).
    Thanks ,
    Simon

    The TEXT_IO raise a NO_DATA_FOUND when the EOF is reached.
    Francois

  • Doubt regarding TEXT_IO package ???

    Hi,
    I recently came to know that TEXT_IO package can only be used in two tier architecture and cannot be provided in three tier architecture, is it true? and if yes why is it so? and is there any other alternative to get things done by three tier architecture???
    cheere...

    TEXT_IO package can only be used in two tier architecture and cannot be provided in three tier architecture, is it true?FALSE, if this means that TEXT_IO does not work in three tier architecture. TRUE, if this means that TEXT_IO can't read files from Client machine.
    See an extract from an Oracle article :
    Take the Forms TEXT_IO package. This package provides the programmer with facilities to read and write text files on the Application Server. WebUtil provides an alternative implementation CLIENT_TEXT_IO, which is identical to TEXT_IO except that calls are implemented on the client browser machine rather than on the middle tier.

  • About the package fl.*

    Hello guys !
    Is it possible to have information about the package fl.* (like import fl.transitions.Tween)
    Because i'm trying to use it with intelli J and i have compilation problem.
    And by the way there is no trace of fl.* in the ActionScript Class Diagram
    Thx

    Ok thx
    But i would like to use the package fl.* without using flash
    In a pure actionScript 3.0 project, and when i try to import this package manually Intelli J (in my case) do not find this package.
    So we can only use fl.* in flash or is there an other way to use it ?

  • Specification about the package oracle.cle.process or oracle.clex

    Where can i find specification about the package oracle.cle.process or oracle.clex?, particularly the class oracle.cle.process.ProcessInfo. I have not could find this specification anywhere, please help me to find it!
    i wait for your help

    This class is part of the MVC Framework. The homepage of this framework on OTN is http://otn.oracle.com/products/ias/9ias_utilities.html#mvc. You can download the user guide and javadoc there. The source code is not publicly available.
    Steven Davelaar,
    JHeadstart Team.

  • Dear sir , i was wondering about the package summer sim . It forever or just fo

    Dear sir ,
    i was wondering about the package summer sim . It forever or just for limited time if is limited what going on after two months ?
    i'm glad to hearing from you .

    For 2 months you get 100GB data free each month having topped £10 to buy the initial pack. Thereafter it becomes an ordinary PAYG SIM where you just make calls /texts against your credit or buy packs. 
     

  • Information about updated packages

    Often when I update my system I want to know what changes have been made to a specific package. Does arch have this information somewhere? On other distros there are places you can look up what the new changes are to a package. It would be good to know if the updated package is just a new build from upstream, a change in the configuration, or a patch to fix some security flaw. For certain things like kernel updates or binutils I can get paranoid upgrading and would just like to read some change log.
    It seems like the most logical places for this in my mind would be a flag to pacman when doing -Suy or perhaps information about the update on the RSS feed for new packages.

    f4hy wrote:The -Qc option is great for the limited packages that have changelogs, but at that point it is a bit too late. It would be nice to know what will be changed BEFORE upgrading the package. A flag to pacman to give the equivalent of -Qc but for --sync would be nice, unfortunately -c is already used :-\
    You can query packages before they are installed, you just have to point it to a file with -Qcp.
    The file must be local, which means downloading it first.
    [fp@oscar ~]$ pacman -Qcp `sudo pacman -Sup|grep -e ^http`
    error: package "http://mirrors.gigenet.com/archlinux/core/os/i686/dhcpcd-4.0.10-1-i686.pkg.tar.gz" not found

  • Question about optimizing packages int Makepkg.conf

    I edited my Makepkg.conf file so that it knows that I have a Intel Core 2 Duo. Do I need to rebuild any packages? How do I go about it if I do?

    Ranguvar wrote:
    SkonesMickLoud wrote:
    slughappy1 wrote:Isn't prescott the right config for an Intel Centrino Core 2 Duo? That's what the guide says. Although, I once tried to install Gentoo. I think I remember that someone told me that prescott is just the current form, and that for the core 2 duo it was going to change. Or something like that
    Prescott is for the i686 version, Nocona is for x86_64.
    Note that this is, I'm pretty sure, independent of what architecture your OS is running (32-bit vs 64-bit).
    Yeah.  What I meant was that if you're running i686 on your Core2Duo it's a Prescott.  If you're running x86_64, it's a Nocona.

  • Question about some packages in arch

    Hello
    Where do I report/ask about packages in arch *like in AUR there is a comment section*
    The reason is because well the package (sdl) didn't had PulseAudio support so I was wondering where to report it and KTorrents didn't bring any plug-ins with the package (plus I can't compile it since there is a phonon error I don't get)
    sorry if this wasn't the section,
    Thanks

    alright, thanks fukawi2, wonder
    well, i'm compiling them alright, but not ABS *need to read the wiki*
    Last edited by akurashy (2009-08-16 15:30:33)

Maybe you are looking for

  • I am trying to find out if I can upgrade my old airport express from WEP to WPA2?  If so, how do I do that?

    I am trying to find out if my old Airport Express can be upgraded from WEP to WPA2?  If so, does anyone know how to do this?  I have a new PC for work reasons and I cannot get online with my WEP password.  I realize now this is why my family and frie

  • The spinning pinwheel on my Imac

    The spinning pinwheel on my Imac constantly causes delays when using the machine. The hard drive has been replaced and the system scanned with MacKeeper showing no problems. Any ideas?

  • Ugly fonts in evince

    Noticed that evince shows ugly fonts for some pdfs, while okular renders them fine. Any way to fix that?

  • Interface to SAP FICA

    Hi, I am new to SAP FICA, this is my first project and in my current project I was assigned to write a Functional Spec for an interface. Work flow is like this, we get an Incomming file from an external source and the interface should load all the in

  • Prevent billing on a particular company code

    Dear All, I want to stop the billing on particular company code from certain date. What would be the best way to do it. The requirement is not through authorisation or through blocking the customers/payers. The billing F2 sahll be still to be used fo