1,105,225 Community Members

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

Member Avatar
rahul.gour
Newbie Poster
3 posts since Feb 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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
Member Avatar
tinstaafl
Postaholic
2,009 posts since Jun 2010
Reputation Points: 559 [?]
Q&As Helped to Solve: 400 [?]
Skill Endorsements: 35 [?]
 
0
 

What error is being reported?

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