Want to upload file in server as a physical file from my d2k program

Friends,
i have created a procedure which render a web page, in that web page i added a button called "browse", where user can select any file from local pc.
and there is another button called "upload". then i want to save this file to Application server or data base server as a phisical file under directory called
"c:\myfiles"
please advice,
thanks

i found the solution, see below. I know you people can only direct to any documents in oracle related site. you don't have any working experience.
i am posting this for others , it might usefull to others.
create DIRECTORY FLOYID_DIR as '\home\Floyid\apps';
select directory_name, directory_path from all_directories
--// I don’t this alter command necessary.
--ALTER SYSTEM SET utl_file_dir='E:\TEST_DIR' SCOPE=SPFILE;
Grant read, write on directory Floyid_dir to <you shema name/db user>
Sample code below.
Declare
InFile utl_file.file_type;
OutFile utl_file.file_type;
vNewLine VARCHAR2(4000);
i PLS_INTEGER;
j PLS_INTEGER := 0;
SeekFlag BOOLEAN := TRUE;
BEGIN
InFile := utl_file.fopen('FLOYID_DIR', 'in.txt','r');
OutFile := utl_file.fopen('FLOYID_DIR', 'out.txt', 'w');
IF utl_file.is_open(InFile) THEN
LOOP
BEGIN
utl_file.get_line(InFile, vNewLine);
i := utl_file.fgetpos(InFile);
dbms_output.put_line(TO_CHAR(i));
utl_file.put_line(OutFile, vNewLine, FALSE);
utl_file.fflush(OutFile);
IF SeekFlag = TRUE THEN
utl_file.fseek(InFile, NULL, -30);
SeekFlag := FALSE;
END IF;
EXCEPTION
WHEN NO_DATA_FOUND THEN
EXIT;
END;
END LOOP;
COMMIT;
END IF;
utl_file.fclose(InFile);
utl_file.fclose(OutFile);
EXCEPTION
WHEN others THEN
RAISE_APPLICATION_ERROR (-20099, 'Unknown UTL_FILE Error');
END

Similar Messages

  • I want to upload one and only that one specific file

    Hi everybody,
    this may sound like a silly question, but I got a problem which is driving me mad I can't figure out a way to solve it.
    So here it comes.. :-)
    Every time I upload files within my DW file manager it not only uploads that specific file but also all the others files. For example I change one html file, upload it and when its done it also loads all the embeded mp3s and videos and css and all that crap which takes hours.
    I'm sure there is a way to tell DW to only upload the file I want to upload, but I can't find it in the setup.
    By the way, I'm using DW CS4.
    Thanks for your help!
    Cheers!

    I don't have CS4, but if you look in the Preferences in the Site section it may have something there to adjust in that regard (Edit -> Preferences -> Site).  In CS3 it provides for allowing one to select whether they want to be prompted to upload dependent files.  In CS3, deselecting these options is supposed to not transfer any dependent files (mine is unchecked, but still prompts).  It may be different in CS4, but in that section there is a Help button that leads to explanations of the settings.
    The wondering I have is whether you are getting a prompt or not regarding uploading dependent files when you try to upload the file.  If so, then that would be where you indicate not to do so.

  • LSMW - Create Logical File Name so that the physical file name is automatic

    Hello,
    In LSMW, I do not want to create a logical file name for each project.  I would like the logical file name to automatically assign the physical file to the *.lsmw.conv of the project being executed. Is there a way of doing that?  If so, could someone share?
    Regards, Dean.

    not possible to create the logical file name to physical file name automatiically.
    because the logical file name created like  PROJECT name + SUB PROJECT name +OBJECT NAME .*.lsmw.conv
    if you change the object name the file will be change....

  • How do I create a slide where users can upload a file to server or email a file?

    Could anyone guide me in how I could go about creating a slide where users can either email a file or upload it to my server?
    Any help would be greatly appriciated...
    Steve

    Hello,
    Welcome to Adobe Forums.
    I am not sure how you can Upload a file, you might need a Javascript.
    You can create a slide and a button of that slide can call the default Email client (MS Outlook, Outlook Express....)
    1) On  you Slide insert a button (Insert -> Standard Object -> Button
    2) Double Click on that button and select "Open URL or file" for On Success (Under Properties Inspector)
    3) Write "mailto:[email protected]" in the URL box (For Example : [email protected])
    4) Publish the result, when you click on the button, it will call the default mail client.
    Screenshot :
    Note : This might not work if you have a Network Security which do not allow calling Mail Client through a Script (Clicking of Button calls the script)
    Thanks,
    Vikram

  • I bought a imac from someone and when ever i try to open a .exe file it wont open its says "choose from the fallowing programs to open " what should i do now

    what should i do now plz hel;p

    Welcome to Apple Support Communities
    Macs use OS X, which is an operating system different than Windows. EXE files are designed to work in Windows, so it's normal that you can't run them.
    If it's a program, you can try an application like CrossOver that allows you to install Windows applications in OS X. However, note that it doesn't always work correctly, so the best option is to run Windows in your Mac.
    To decide if you need Windows on Boot Camp or virtual machine, see > https://discussions.apple.com/docs/DOC-3321
    If you need a virtual machine, install an application like Parallels, VMware Fusion or VirtualBox, and create a virtual machine to install Windows.
    If you need Boot Camp, first see which operating systems you can install > http://support.apple.com/kb/ht5634 Then, open Boot Camp Assistant (in /Applications/Utilities) and follow its steps. Follow Apple's steps > http://manuals.info.apple.com/en_US/boot_camp_install-setup_10.8.pdf

  • Dreamweaver Cs6 Uploading to remote server to web-host,the.swf files do not load on the webpage

    all the content works fine with the file path being the computers harddrive  :/C "etc"
    once i upload to webhosting server all the swf files don't work.
    My website is fully complete and ready to go on the web can someone help me and tell me why my content is not showing.
    the webhosting customer service rep told me i need to upload with media files checked? im like i never heard of that lol.

    The links in the webpage all point to your local hard drive
    <param name="movie" value="file:///C|/Users/lol/Documents/Website flash art 5.swf" />
    No-one can see these links except you.
    This suggests that you have not defined a site in Dreamweaver
    http://www.adobe.com/devnet/dreamweaver/articles/first_website_pt1.html
    Is this the case?

  • Upload file without asking user for the file

    Hi,
    I need to upload a file to server, but from my code, not using the file upload from page.
    I have created a xml file and I need to upload to server when user open a web browser (without asking user to select a file).
    How do I proceed??, or what kind of libraries do I must use?
    thanks

    davisote wrote:
    Hi,
    thanks for answer.
    Let me try to explain again (I think its very simple).Simple, yes. But not very thorough.
    I have developed a web application using JSF.So all the code is running on the server, right? There are no Applets, Applications or WebStart applications involved. Right?
    My application has a splash screen where I show data. I have developed a bean to connect to my database (sql server), extract this data and create an xml (using DOM) file like:
    <news>
    <simplenews id="1"> Value </simplenews>
    </news>And that bean runs ... where? Server again?
    (important step) Once I have created the xml file in my bean I want to upload to the server to a place like /WEB-INF/news.
    If the code is running on the server, then "uploading" is the wrong term, as there's nowhere to upload to, since you're already on the server.
    This may sound like nit-picking, but you're sending us on a wrong trail with this phrase.
    Once the file is on the server with another bean I read the xml fileWhy don't you simply store it in the application scope and let everyone access it from there? It doesn't sound as if the XML is huge.
    As you can see I haven't a web page where to show an upload file componetYou also don't want to "upload" anything from the client, from the sound of it.
    You simply want to transfer data between to server-side components, if I understood you correctly.

  • Upload Component:can't pre-treat the file before upload?

    I use FileReference to upload files to server , like this topic:http://forums.adobe.com/thread/709281?tstart=0
    After users select files which to upload,I can get file name,file creator,file creationDate via FileReference's fields.
    But now I want to compress the txt file which users select and then upload the compress data to my server, but I can't find data field in Class FileReference.
    So can't i read the file which users want to upload to the server?
    Is there any methods to solve this problem?

    I use FileReference to upload files to server , like this topic:http://forums.adobe.com/thread/709281?tstart=0
    After users select files which to upload,I can get file name,file creator,file creationDate via FileReference's fields.
    But now I want to compress the txt file which users select and then upload the compress data to my server, but I can't find data field in Class FileReference.
    So can't i read the file which users want to upload to the server?
    Is there any methods to solve this problem?

  • How to synchronize File Manager Server when I install Agile on distributed?

    The Environment I install is : two Agile Server , two File manager Server ,one Web Proxy Server, one DB Server .
    The Agile version I install is Agile 9.3.1 for Linux ,the Middleware is weblogic 10.3.2 .
    Now I finish install two Agile Server ,and successful make two server compose a cluster.
    Now I will install two File manager Server ,I want to ask what's the method let me synchronize two file manager Server ?
    Does the File manager has this mechanism to let the file keep synchronize on two file manager server?
    I find a PDF name "Agile PLM Capacity Planning Guid" V 9.3.1 ,it says there are two software can synchronize file manager server , is XXCOPY and RoboCopy, but the two softwares only support Windows . Is there a software support synchronize file manager server on Linux ?
    帖子经 954937编辑过

    Hi I believe you have the wrong forum.
    This forum is for the Agile PLM for Process product suite, not for the Agile A9 suite. For Agile A9 or Primavera questions, you can use Oracle Support, Support Communities, Yahoo Groups for Agile API or WRAU.
    This forum is for Agile PLM for Process, which is part of the same Agile family but a different product.
    Thanks.

  • FTP(File zilla)Server Error

    Hi,
    I am using FTP Server(File Zilla Server)  to read the file from my WinXP local machine.The File Zilla Server downloaded from Web and  configured it.
    The directory is C:/Data/Common/FTP and filename is "Sender.txt" ,When i give this path in Sender file CC-->Source Directory i am getting this error.
    (000124) 06.01.2010 16:37:26 - ww007\satees1n (157.163.142.79)> 230 Logged on
    (000124) 06.01.2010 16:37:26 - ww007\satees1n (157.163.142.79)> SYST
    (000124) 06.01.2010 16:37:26 - ww007\satees1n (157.163.142.79)> 215 UNIX emulated by FileZilla
    (000124) 06.01.2010 16:37:26 - ww007\satees1n (157.163.142.79)> TYPE I
    (000124) 06.01.2010 16:37:26 - ww007\satees1n (157.163.142.79)> 200 Type set to I
    (000124) 06.01.2010 16:37:26 - ww007\satees1n (157.163.142.79)> CWD C:/Data/Common/FTP
    (000124) 06.01.2010 16:37:26 - ww007\satees1n (157.163.142.79)> 550 CWD failed. "/C:/Data/Common/FTP": directory not found.
    I searched some threads,but i am n't clear. So can you please provide your inputs.
    Thanks,
    Sateesh

    Hi,
        You need to create the FTP users in the File Zilla interface (as you are seeing the logs..there option to create the users and Home directory for the same...)
    once this is done then need to provide that directory as source directory but not as relative path (like C:/...)
    after creating the user you can try login into FTP and can check the same...using Command Prompt...
    HTH
    Rajesh

  • File Data server error

    Hi , I have used the following steps to create a FILE Data Server
    To create a File Data Server:
    1. Connect to Topology Manager
    2. Select Topology > Physical Architecture > Technologies > File from the tree
    3. Right click and select Insert Data Server
    4. Fill in the following fields in the Definition tab:
    • Name: Name of the Data Server as it will appear in Oracle Data Integrator
    • User/Password: Not used.
    5. Fill in the following fields in the JDBC tab, according to the driver used:
    • JDBC Driver: com.sunopsis.jdbc.driver.file.FileDriver
    • JDBC URL: jdbc:snps:dbfile
    6. Click Test
    7. Click Test in the Test Connection window
    But I am getting an error
    http://img30.imageshack.us/img30/5173/test3i.jpg
    Can you please tell me what am I missing. I am new to ODI

    Hi ,
    Its just typing error , you have mentioned here correctly the jdbc driver correctly as com.sunopsis.jdbc.driver.file.FileDriver
    but looking carefully in the image file you have send me , you have mentioned the file driver wrongly as you are missing the word "driver" in your jdbc driver .
    Please correct it and it will work .

  • Where can i find class files in server

    Hi Gurus,where can i find class files in server.
    Kranthi

    Hi,
    Class files:
    Common\JAVA_TOP
    Pages:
    Appl\mds
    Regards
    Meher Irk

  • Mapping physical file name to logical file name

    Hi All,
    Can anybody let me know wht is the procedure to map a logical file name to physical file name. wht is the use of logical file name when there exists physical file name?
    Thanx in Advance

    As far as creating the Logical path  it’s done through the transaction code ‘file’ by using options
    Steps are:
    1. Logical file path definition which is logical file path name.
    2. Assignment of physical path to logical path - where we give the physical path to the logical path name defined in the last step.
    After creating the Logical path the procedure to attach the file name to the Logical path is as follows:
    Use the function Module C13Z_FRONT_END_TO_APPL to upload the file from the front end to the application server.
    Source file on front end will be the CSV file path which is to be uploaded to the application server
    Target file on application server will be the physical path of the file on the application server where the file is to be uploaded.
    Attach the physical path of the file on the application server to the Logical file using transaction code ‘file’.
    Logical File:   The Logical name of the file which will be used by the interfaces to upload the file
    Physical file:  The name of the physical file on the application server
    Logical path:  The path of the physical file on the application server where it is stored.
    The possible reason for the use of Logical file name could be we can have directories within SAP in which we can have logical files stored. These files can be used by various interfaces. Different Logical paths can be used for different interfaces. the second reson can be to give more user friendly name to the file rather than a long physical name to the file.

  • How to upload file to server on specific path ?

    Hi ,
    Friends i have written code to check on local machine to upload , using apache commons file upload.
    its working good.
    but when i m giving path for web server it is not uploaded on server, what will be the reason ?
    dirName = request.getContextPath()+"/uploads" ;
    since i want to upload my all files to my : WebAPP_ROOT/uploads
    when i am printing using
    request.getContextPath( ) +"/uploads" its showing me correct path, but file is not uploading.
    I have another issue but might its not secure , as it is showing real physical path to dir
    dirName = application.getRealPath("/");
    also tell me how secure this is ?  it will take by default  ROOT HOME to :
    WebAPP_ROOT / build/web       instead  i want   WebAPP_ROOT/uploads
    provide me solution for this.

    I am asking about the following security issue.
    String picturefile =application.getRealPath("/" + request.getParameter("file"));
    or
    String picturefile =getServletContext().getRealPath("/" + request.getParameter("file"));
    One important note: whenever you access local resources, be very careful to validate the incoming data. A hacker, or a careless
    user, can send bogus data to hack your site. For instance, consider what would happen if the value <code>file=../../../../etc/passwd</code> were entered. The user could in this way read your server's password file.

  • File upload on different server. URGENT need help.

    hi,
    I am using struts common file upload to upload file from client. My problem is my application is running on server A but i want to store uploaded stream on server B without storing it on server A(i,e. without using FTP or rsync from server A to server B). Please help how can i achieve this task.
    Anuj

    Write and run a standalone application on "Server A" to accept a socket connection from "Server B" then feed the inputStream that "Server B" uses to upload the file, to the socketOutputStream that it has opened with "Server A" and have Server A save that file.

Maybe you are looking for