我試圖將一個pdf文件上傳到FTP服務器。我試圖通過訪問wininet DLL但未成功。在MS Access 2007中將PDF文件傳輸到FTP服務器
在MS Access 2007 VB6中這樣做的最好方法是什麼?我可以打電話給.net DLL,但那是我最後的手段。
預先感謝您。
我試圖將一個pdf文件上傳到FTP服務器。我試圖通過訪問wininet DLL但未成功。在MS Access 2007中將PDF文件傳輸到FTP服務器
在MS Access 2007 VB6中這樣做的最好方法是什麼?我可以打電話給.net DLL,但那是我最後的手段。
預先感謝您。
如果你的意思是VB6,那麼你可以使用一個控件來實現FTP功能。轉到Project/Components並將「Microsoft Internet Transfer Control」添加到您的項目中。這是相當容易使用,但像...
當它完成
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
檢查Inet.ResponseCode如果你在MS /訪問意味着VBA,那麼你可以寫了一個小批處理文件,然後殼執行它。
YEah,我的意思是VBA。我剛剛寫了批處理文件並將其解壓出來。謝謝。 – Eric
請參閱http://stackoverflow.com/questions/202197/how-to-use-sftp-from-within-an-ms-access-database-module – Fionnuala