在MS Access 2007中将PDF文件传输到FTP服务器 [英] Transfer PDF file to ftp server in MS access 2007

查看:229
本文介绍了在MS Access 2007中将PDF文件传输到FTP服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将pdf文件上传到FTP服务器。我尝试过访问wininet dll但未成功。



在MS Access 2007 VB6中执行此操作的最佳方法是什么?我可以打电话给一个.net dll,但这是我最后的手段。



预先感谢您。 解决方案

如果你的意思是VB6,那么你可以使用一个控制来实现FTP功能。转到Project / Components并将Microsoft Internet Transfer Control添加到您的项目中。这很容易使用,但像...... ...

pre $ Inet.UserName =用户名
Inet.Password =密码
Inet.Protocol = icFTP
Inet.RemoteHost =123.123.123.123

Inet.Execute,put& sFileToTransfer& & sFilenameOnRemoteHost

虽然Inet.StillExecuting
DoEvents
Wend

在完成时检查Inet.ResponseCode



如果您是指Ms / Access中的VBA,则可以写出一个小批处理文件,然后执行shell命令执行它。 / p>

I'm attempting to upload a pdf file to an ftp server. I've tried this by accessing the wininet dll but unsuccessfully.

What is the best way to do this in MS Access 2007 VB6? I can call a .net dll, but that is my last resort.

Thank you in advance.

解决方案

If you mean VB6 then there's a control you can use for FTP functions. Go to Project/Components and add the "Microsoft Internet Transfer Control" to your project. It's fairly easy to use, but something like...

    Inet.UserName = "Username"
    Inet.Password = "Password"
    Inet.Protocol = icFTP
    Inet.RemoteHost = "123.123.123.123"

    Inet.Execute , "put " & sFileToTransfer & " " & sFilenameOnRemoteHost

    While Inet.StillExecuting
        DoEvents
    Wend

Check Inet.ResponseCode when it finishes

If you mean VBA in Ms/Access then you could write out a small batch file and then shell out to execute it.

这篇关于在MS Access 2007中将PDF文件传输到FTP服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆