Im trying to connect to an ftp but its not working and Im testing it using the ftp DOS command and work properly. See my code, whats wrong?
Remarks: FTP_HOST, FTP_USUARIO and FTP_SENHA are correctly defined
B4X:
Sub btnSincronizarAgora_Click
ErrorLabel(ErrorConexion)
Message = "Create the object"
ftp.New1
WaitCursor(True)
Message = "Connecting"
ftp.Open(FTP_HOST, FTP_USUARIO, FTP_SENHA)
WaitCursor(False)
ErrorLabel(ErrorListing)
FTP_ARQUIVOS() = ftp.GetEntries()
goto go1
ErrorConexion:
Erro("Error " & Message)
Return
ErrorListing:
Erro("Error listing the files")
ftp.Close
Return
go1:
ftp.Close
End Sub