Press "Enter" to skip to content

Upload Files To FTP in Oracle Forms D2k

Upload Files To FTP in Oracle Forms D2k

Use following procedure to upload files to Ftp. 

PROCEDURE Ftp_Upload IS
    outfile text_io.file_type;
BEGIN
    — write a ftp script
    outfile := text_io.fopen(‘D:ftpsendsource.ftp’, ‘w’);
    text_io.put_line(outfile, ‘open yourftpurl’);
    text_io.put_line(outfile, ‘youruser’);
    text_io.put_line(outfile, ‘yourpassword’);
    text_io.put_line(outfile,’binary’);
    text_io.put_line(outfile,’send D:TempTest1.txt’);
    text_io.put_line(outfile,’send D:TempTest2.abc’);
    text_io.put_line(outfile,’disconnect’);
    text_io.put_line(outfile,’bye’);
    text_io.fclose(outfile);
    host(‘cmd /c ftp -s:d:ftpsendsource.ftp’);
    exception
         when others then
           if text_io.is_open(outfile) then
                   text_io.fclose(outfile);
           end if;          
           message(sqlerrm);
END;

Vinish Kapoor

Hi, I am a full stack developer and writing about development. I document everything I learn and help thousands of people. foxinfotech.in is created, written, and maintained by me; it is built on WordPress, and hosted by Bluehost. Connect with me on Facebook, Twitter, GitHub, and get notifications for new posts.

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *