首页 > 数据库技术 > 详细

Upload Files To FTP in Oracle Forms D2k

时间:2016-12-26 00:37:20      阅读:339      评论:0      收藏:0      [点我收藏+]

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:\Temp\Test1.txt‘);
    text_io.put_line(outfile,‘send D:\Temp\Test2.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;

技术分享

Upload Files To FTP in Oracle Forms D2k

原文:http://www.cnblogs.com/quanweiru/p/6220780.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!