Problem in creating file on local machine

Hello everbody...
i m using forms and reports 6i
i m creating file out_file := Text_IO.Fopen(:filepath || '.csv', 'a'); using this command in before_report trigger. And closing file in after_report trigger.
here filepath is = \\IP address of local machine\d$\file name
now problem is that if i m giving IP address of local machine then its giving error ORA-39856.
And if i m giving IP address of server machine then it is going to create file on server machine from local machine.
Why its not creating file on client machine?
i think there r problems related to rights
can anyone has solution then please tell me

yes in report there is report output and with that it also creating file in coding by
out_file := Text_IO.Fopen(:filepath || '.csv', 'w');
this open stmt is written in before report trigger
Below lines r written for each row thats fetch by report main query.
str := rpad(:apt_bil_no,8,' ') || ',' || lpad(:apt_bil_dt,10,' ') || ',"' ||
               rpad(:supl_name,30,' ') || '",' || rpad(:supl_tin_no,11,' ') || ',' ||
               rpad(:aptvat_hsn_no,10,' ') || ',' ||
               lpad(ltrim(to_char((apt_amt2 - apt_vat_amt2),'999999990.00')),12,' ') || ',' ||
               lpad(apt_vat_amt2,12,' ') || ',' ||
               lpad(ltrim(to_char(apt_amt2,'999999990.00')),12,' ');
Text_IO.Put(out_file, str);
Text_IO.New_Line(out_file);
file is closing in after report trigger.
text_io.fclose(out_file);
now i wants to create this file on local machine.
yes using report server and its started window service.
can u have any idea?

Similar Messages

  • Firefox 7.0 - Can not upload the file from local machine to server...gives "error 404 : file not found"

    firefox 7.0 - Can not upload the file from local machine to server...gives "error 404 : file not found"

    you have not understood my point
    how does this code will run on servlet when I want to upload a file from client's
    machine to server machine
    what I am doing is I am giving an option to the user that he/she can browse the file and then select any file and finally it's action is post in the jsp form for which I have sent the code
    All the computers are connected in LAN
    So how to upload a file from client's machine to server's machine
    Plz give me a solution

  • Problem in creating file in j2me

    Hi
    i am novice in j2me and i am facing a problem in creating file in j2me.
    i am using this code to make the file on my c drive.
    try {
    FileConnection fc = (FileConnection) Connector.open("file:///c:/sms.txt");
    if (isDirectory) {
    fc.mkdir();
    } else {
    fc.create();
    but its not create any file on my c drive plz tell me where i wrong in this code and what should i do to create file on my c:/ drive.
    plz help me thanks in advance..

    Hi u can do it like this
    FileConnection fc = (FileConnection) Connector.open("file:///root1/sms.txt");
    This will create a file called sms.txt in the root1 directory which is the default root directory in everyphone and u can find this directory on ur PC in the WTK folder\appdb\DefaultColorPhone\filesystem\root1 asumming that u r using the DefaultColorPhone as ur emulator
    Regards
    Sagar

  • Creating flat file in local machine

    Gurus,
    My database is OLAP database, i need to extract the data into flat file (.csv/.txt/.xls) in to client machine (Local machine, or End user PC) not in to Oracle DB Server.
    Is it possible to achieve the same without using UTL_FILE?
    If so please help me in this regard.
    Thanks in advance.
    Karthik.K

    What client are you running on the PC to connect to the database
    If sqlplus you can spool the output
    Re: Create a file in a local PC.
    Other options some of which write to the client.
    http://tkyte.blogspot.com/2009/10/httpasktomoraclecomtkyteflat.html

  • Saving Email as a .msg file on local machine

    Hi Everyone,
    I have a requirement of reading an email from the INBOX folder and later save it as a .msg file on my local machine. Although, the file is getting created, I am unable to open it. However, when the file is saved as an .eml file, it works fine.
    I have tried saving a .msg file from outlook and opening it, however, the problem is with the email file saved as .msg file using java.
    Any suggestions on fixing this problem.
    Thanks,
    Nitin

    Hi nithin,
    You can achieve this when the client send the message to you in octet streem then the par object contains the message subject as file name along with .msg files . if you store the same you can retrieve by using
    response.setcontenttype("octet-stream")
    and retrieve the stored message in .msg extension. can you pleasse let us know hoe you are capturing the part and storing in PC , I mean which type of part you are trying to open whether the part object content in octet stream or message/RFC822 format. please let me know.

  • Saving an xml file in local machine(urgent)

    Hi Techies,
    I am creating the xml file from jsp and generation of xml is working fine for me.
    Now the query is How can I point out the location of local machine??
    Here is my code
    String locationAndBackupFileName =request.getParameter("locationAndNameOfBackupFile");
                             System.out.println("Location"+locationAndBackupFileName);
    StringWriter  stringOut = new StringWriter();       
    XMLSerializer   serial = new XMLSerializer(stringOut, new OutputFormat("xml", "UTF-8", true));
    response.setContentType("application/xml");
    response.setHeader("Content-Disposition","attachement; filename="+locationAndBackupFileName);
    serial.setOutputCharStream(new FileWriter(locationAndBackupFileName));
    serial.serialize(document.getDocumentElement());when I xcute my code I am getting download dialog box, with save option.
    But after downloading no data is available.
    Can u guys help me to fix this problem
    regards,
    krish

    I don't know what you mean by "location of local machine". The response is being sent to a client machine (maybe that's your "local" machine). You have a lot of strange code that looks like it's serializing the XML to various places, but it should be serializing it to the response's output stream if you want it to go to the client.
    There is no way for you, on the server, to control where on the client machine the response data will be stored. That is entirely up to the user on the client. And you certainly can't write it to the client without the knowledge and consent of the client. That's just basic network security.

  • Saving any KM file in local machine

    Hi All,
    I have a  requirment in that i have to save any KM file in my local machine from PDK application.
    Please help me out.
    Regards,
    Deepak

    Hi deepak,
    This may be the one way through which you can copy the KM folder to the local machine.This may not be the best option but may resolve your problem.
    Create a file repository in the KM content which will map to your lacal machine folder. Then you can see the local machine folder name as one of the repository in your KMcontent repository list. Then you can copy any Km folder to that repository. In this way all these folders will be available in your local machine physically.
    This may resolve your problem!!!
    Regards
    Manisha

  • Creating file on local drive while running the report on web

    I am using text_io package to write data to a file in reports. When I run it on my local machine, it creates the file (in C drive) perfectly but, when I am running this same report on the report server, it doesn't create the file. Looks like report server doesn't understand where to create the output file. I hard coded the path(C:\xyz.csv) in my report as to where to create the file, but the report server is not creating the output file. Any suggestions how to create the output file on my local machine while running on the web.

    Bhasker,
    You will have to use destype=localfile
    Please refer to appendis on commandlines in
    http://otn.oracle.com/products/reports/htdocs/getstart/docs/a92102_01.pdf
    Thanks
    The Oracle Reports Team

  • Problem when downloading file to local using WPG_DOCLOAD.download_file

    Hi ,
    i am using database 11g and i am trying to write to file on database server using utl_file and download to the local machine by pl/sql procedure . i am directly executing this procedure in pl/sql . i am getting ORA-06502: PL/SQL: numeric or value error when executing owa_util.mime_header ('application/vnd.ms-excel',TRUE); statement in the procedure . not sure what is happening and i am new in using these features
    here is my code
    CREATE OR REPLACE PROCEDURE UTL_TEST_DOWNLOAD
    AS
    output_file utl_file.file_type;
    vexists BOOLEAN;
    vfile_length NUMBER;
    vblocksize NUMBER;
    l_blob BLOB;
    l_bfile BFILE;
    BEGIN
    output_file:=UTL_FILE.FOPEN('DATA_DIR', 'timesheet.csv', 'w');
    UTL_FILE.PUT_LINE(output_file,'COST_CENTRE'||
    'HISTORY_DATE'||
    'REF_NO'||
    'FIELD_NAME'||
    'VALUE'||
    'DATA_TYPE'||
    'CHANGE_DATE'||
    'INT_REF');
    UTL_FILE.fclose(output_file);
    UTL_FILE.FGETATTR('DATA_DIR','timesheet.csv',vexists,vfile_length,vblocksize);
    IF vexists THEN
    DBMS_LOB.createtemporary (l_blob, TRUE, DBMS_LOB.SESSION);
    l_bfile := BFILENAME ('DATA_DIR', 'timesheet.csv');
    DBMS_LOB.fileopen (l_bfile,dbms_lob.file_readonly);
    DBMS_LOB.loadfromfile (l_blob, l_bfile, DBMS_LOB.getlength (l_bfile));
    DBMS_LOB.fileclose (l_bfile);
    owa_util.mime_header ('application/vnd.ms-excel',TRUE);
    dbms_output.put_line('after owa_util' );
    owa_util.http_header_close;
    WPG_DOCLOAD.download_file (l_blob);
    end if;
    EXCEPTION
    WHEN utl_file.invalid_path THEN
    RAISE_APPLICATION_ERROR(-20001, 'utl_file.invalid_path');
    WHEN utl_file.invalid_mode THEN
    RAISE_APPLICATION_ERROR(-20001, 'utl_file.invalid_mode');
    WHEN utl_file.invalid_filehandle THEN
    RAISE_APPLICATION_ERROR(-20001, 'utl_file.invalid_filehandle');
    WHEN utl_file.invalid_operation THEN
    RAISE_APPLICATION_ERROR(-20001, 'utl_file.invalid_operation');
    WHEN utl_file.read_error THEN
    RAISE_APPLICATION_ERROR(-20001, 'utl_file.read_error');
    WHEN utl_file.write_error THEN
    RAISE_APPLICATION_ERROR(-20001, 'utl_file.write_error');
    WHEN utl_file.internal_error THEN
    RAISE_APPLICATION_ERROR(-20001, 'utl_file.internal_error');
    WHEN OTHERS THEN
    dbms_output.put_line('SQLERRM '||SQLERRM);
    END UTL_TEST_DOWNLOAD
    SQLERRM ORA-06502: PL/SQL: numeric or value error
    The file is getting created all the time i execute this procedure i am getting the above error while executing this statement owa_util.mime_header ('application/vnd.ms-excel',TRUE);
    Edited by: user5784286 on Jul 2, 2012 7:35 PM

    Hi,
    You need to call the procedure owa.init_cgi_env before you can use owa_util.mime_header from SQL*Plus.
    See [url http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:500221786045]here for details.
    Rod West

  • Download file to local machine using WPG_DOCLOAD.download

    Hi ,
    i am using database 11g and i am trying to write to file on database server using utl_file and download to the local machine by pl/sql procedure . i am directly executing this procedure in pl/sql . i am getting ORA-06502: PL/SQL: numeric or value error when executing owa_util.mime_header ('application/vnd.ms-excel',TRUE); statement in the procedure . not sure what is happening and i am new in using these features
    here is my code
    CREATE OR REPLACE PROCEDURE UTL_TEST_DOWNLOAD
    AS
    output_file utl_file.file_type;
    vexists BOOLEAN;
    vfile_length NUMBER;
    vblocksize NUMBER;
    l_blob BLOB;
    l_bfile BFILE;
    BEGIN
    output_file:=UTL_FILE.FOPEN('DATA_DIR', 'timesheet.csv', 'w');
    UTL_FILE.PUT_LINE(output_file,'COST_CENTRE'||
    'HISTORY_DATE'||
    'REF_NO'||
    'FIELD_NAME'||
    'VALUE'||
    'DATA_TYPE'||
    'CHANGE_DATE'||
    'INT_REF');
    UTL_FILE.fclose(output_file);
    UTL_FILE.FGETATTR('DATA_DIR','timesheet.csv',vexists,vfile_length,vblocksize);
    IF vexists THEN
    DBMS_LOB.createtemporary (l_blob, TRUE, DBMS_LOB.SESSION);
    l_bfile := BFILENAME ('DATA_DIR', 'timesheet.csv');
    DBMS_LOB.fileopen (l_bfile,dbms_lob.file_readonly);
    DBMS_LOB.loadfromfile (l_blob, l_bfile, DBMS_LOB.getlength (l_bfile));
    DBMS_LOB.fileclose (l_bfile);
    owa_util.mime_header ('application/vnd.ms-excel',TRUE);
    dbms_output.put_line('after owa_util' );
    owa_util.http_header_close;
    WPG_DOCLOAD.download_file (l_blob);
    end if;
    EXCEPTION
    WHEN utl_file.invalid_path THEN
    RAISE_APPLICATION_ERROR(-20001, 'utl_file.invalid_path');
    WHEN utl_file.invalid_mode THEN
    RAISE_APPLICATION_ERROR(-20001, 'utl_file.invalid_mode');
    WHEN utl_file.invalid_filehandle THEN
    RAISE_APPLICATION_ERROR(-20001, 'utl_file.invalid_filehandle');
    WHEN utl_file.invalid_operation THEN
    RAISE_APPLICATION_ERROR(-20001, 'utl_file.invalid_operation');
    WHEN utl_file.read_error THEN
    RAISE_APPLICATION_ERROR(-20001, 'utl_file.read_error');
    WHEN utl_file.write_error THEN
    RAISE_APPLICATION_ERROR(-20001, 'utl_file.write_error');
    WHEN utl_file.internal_error THEN
    RAISE_APPLICATION_ERROR(-20001, 'utl_file.internal_error');
    WHEN OTHERS THEN
    dbms_output.put_line('SQLERRM '||SQLERRM);
    END UTL_TEST_DOWNLOAD
    SQLERRM ORA-06502: PL/SQL: numeric or value error
    The file is getting created all the time i execute this procedure i am getting the above error while executing this statement owa_util.mime_header ('application/vnd.ms-excel',TRUE);

    Hi,
    it seems your issue is with PLSQL product so I would suggest to post your question in the PLSQL forum.
    reference
    PL/SQL
    REgards, Roberto

  • How to allow user to select pdf file on local machine and populate field with file name only

    Folks,
    I have a project requirement that I am stumped on.  I am admittedly a novice, so forgive questions that may seem obvious.
    My requirement is a form running on a client system where the user can click a button and select a PDF file name from a PDF on their local machine and then populate a form field with that file path & filename.  The file names vary between all machines, so there is no static list.  Note that the PDF is not embedded, nothing is executed, I simply need the file name.
    There are several of these on a form (20+), so manual name entry is too error prone.   I would like to use a 'browse' type dialog, but can not figure out how to implement it.
    I've looked at app.browseForFile, but the users can not install a javascript file in their adobe folder or any other files;  the functionality has to be integral with the original PDF. 
    Functionally, this is no different from the image object file browse, except that I need a PDF instead of an image file, so there doesn't seem like there should be a security issue that is any different from those surrounding the image object.
    I've been stumped on this for the entire week, and I have a deadline rapidly approaching, so any examples or suggestions (please remember I'm a novice) would be greatly appreciated! 

    Thanks for the reply Paul - do you have any sample code of how to attach the PDF?  Or how the user can select a PDF to open?  I might be able to attach it, retrieve the file name, and then un-attach it.
    Alternatively, do you know how to retrieve the file name from the imagePath object?  It will let you select PDF files, but I can't find info on how to retrieve the file name.   It should be the way you would retrieve the file name for an image.
    As a novice in this, thanks for your help and patience!

  • [File] Problem while creating files with long pathnames

    Hello everybody
    I'm trying to create File objects corresponding to physical files. These files have very long pathnames because they are located in directories tree with large depth. So, my pathname conatins a lot of directories plus the name of the file itself.
    It seems, that there is a limitation in the length of the pathname that I pass to the File constructor because files with small pathnames are OK bu the ones with very large pathnames cannot be created.
    I tried the different File constructors (File(String pathname) and File(File parent, String childname)) but it still does not work. Even if the second constructor is a little bit better as it succeeds on files where the first constructor failed. But still, it's not enough.
    Please Help!
    Thank you
    Hugo

    RESOLVED!
    The problem was from the OS itself (Windows XP) which accepts at most 255 characters long path names.

  • Sharepoint 2010 is automatically downloading Office2010 files to local machine's Recent Documents, instead of opening from library, off an emailed link.

    Hi-
    Please forgive me if this exact question has been asked already (if so I'm not finding it via Google or these forums), but one of my users can't seem to edit documents IN libraries, via links emailed to him.  He clicks on the link and the
    file auto-downloads with no Read-only/Edit option pop-up, and he can edit it (without getting the annoying yellow "this is read only from the server, click to edit document" bar up top either), but naturally his changes to these documents
    are only being saved on his local machine and not making it back to the library....  Our IT dept gave him a Save As workaround (that, it appears, would make a SECOND file in the library, which is not going to work for our processes), but nobody
    else is having this issue....  I'm thinking this is a simple settings change someplace in Sharepoint 2010 or Word 2010 (we have Windows 7), or maybe IE, or it's possible his User profile in our network needs some kind of adjustment...  anyway,
    any/all help appreciated.  Thanks.
    CF

    Hi,
    1. For automatically download the files, please check the office software settings. for word file, please open local word > file > options > save > save checked-out files to: > select "the office document cache"
    2. site actions > site settings > site administration > search and offline availablity to change the settings.
    3. Please compare the add-ons from this user's IE setting and the working fine IE setting.
    Regards,
    Seven 

  • How to update a BLOB column in a table with a file in local machine?

    I have a file (of XML type) in my local machine. I want to update it in a BLOB column of a table in databse server. Can anyone help me in this regard. Appreciate your help.
    Regards
    Walter Nicholas

    user447427 wrote:
    I have a file (of XML type) in my local machine. I want to update it in a BLOB column of a table in databse server. Can anyone help me in this regard.That's the client's job to read data on the client PC (from keyboard/mouse/scanner/file/whatever input) and submit that to the database server for processing and/or storage.
    You cannot expect the server to hack into your PC and lift that data in the file from your disk. Not that is not technically possible. You can wire rockets onto a bicycle to make it go faster, but that's not a wise thing to do. Similarly, it is not a bright idea to ignore the very basics of client-server.
    Bottom line - you need client s/w on your PC to load the content of that file into Oracle. It can be done using SQL*Loader as already suggested. It can be done using a web browser (submitting it via HTTP to web-enabled PL/SQL code). You can use FTP or WebDav and upload into Oracle's XDB (XML database).
    Your requirements will determine what client to use. Once off load? SQL*Loader is very easy to use for loading XML files into the database.

  • Problem of create file

    Hello everyone.
    I want to create file ,and the content of the file can refurbish in a two days.
    What should I do ?
    Thanks.

    Hi liying,
    I'm not sure I understand what you mean by "refurbish", so please let me know if misunderstood the question.
    Do you want to keep appending to a file in the beginning of the period and then after a specified time (you say two days) start overwriting the file from the beginning? This is basically a circular buffer using a file as the memory. All you have to do is control where in the fle you want to write to. For that purpose, use the "pos mode" and "pos offset" inputs of the Write Fi;e function. As you can see below, the help for this function describes how to use these inputs:
    Have fun!Message Edited by Philip C. on 06-02-2005 09:53 PM
    - Philip Courtois, Thinkbot Solutions
    Attachments:
    FilePosition.PNG ‏18 KB

Maybe you are looking for

  • Changing Vertical display to horizontal in Crystal report 10

    Post Author: arun.net CA Forum: Charts and Graphs Hi. I am working in one of the .net application where we are using Crytal report version X(10) for report generation. I have Week_start(Data type Date) as field in the graph,but by default is displayi

  • How do i format a MMC in the PC?

    How do i format a MMC in the PC?

  • Novice needs help with multi-cam

    Hi, I've got 3 cameras and a seperate audio track synched in my timeline. (CC Premiere Pro 6 on a PC with - unfortunately, Windows 8) The cameras didn't all start at the same time but no problem the clips are where they need to be now. I've made seve

  • Does v560 laptops support sata 3 hdds?

    hi all i want to change my 500 gb hdd with a larger one, 750 gb or 1tb. i would like to know if sata 3 hdds will work in  my system. i dont mind sata 3 working in speed of sata 2. if it works it is enough.

  • Printer issue mavericks

    Since Iintalling mavericks these are the issues my computer is having: Group differs on "Library/Printers"; should be 80; group is 0.Group differs on "Library/Printers/Icons"; should be 80; group is 0.Group differs on "Library/Printers/InstalledPrint