码迷,mamicode.com
首页 > 数据库 > 详细

Upload Files To FTP in Oracle Forms D2k

时间:2016-12-26 00:39:03      阅读:249      评论:0      收藏:0      [点我收藏+]

标签:break   position   play   procedure   dso   enter   sans   order   blog   

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

标签:break   position   play   procedure   dso   enter   sans   order   blog   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!