1.11M Members

Error while FTP a file using VB 6.0 ( Error while call Putfile)

 
0
 

Public Function FTPFileTransafer(ByVal Host As String, _

Public Function FTPFileTransafer(ByVal Host As String, _
                                  ByVal User As String, _
                                  ByVal Password As String, _
                                  ByVal Serverfilepath As String, _
                                  ByVal LocalFilePath As String) As Boolean

On Error GoTo FTPError

        Dim intFTPConnect As Integer
        Dim intFTPPutFile As Integer

        FTPFileTransafer = False

        Dim objftp As FTP2.clsFTP
        Set objftp = New FTP2.clsFTP
        objftp.Host = Host
        objftp.User = User
        objftp.Password = Password

        intFTPConnect = objftp.Connect(objftp.Host, objftp.User, objftp.Password)


        Call objftp.PutFile(LocalFilePath, Serverfilepath, ftAscii) ' ftBinary
        'Call objftp.GetFile(  LocalFilePath, Serverfilepath, 1)

        objftp.Disconnect
        Set objftp = Nothing
        FTPFileTransafer = True
        Exit Function

FTPError:

       MsgBox Err.Description
        objftp.Disconnect
        Set objftp = Nothing
        FTPFileTransafer = False
        Exit Function
End Function
 
0
 

What error is being reported?

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article