Home › Forums › ActiveX components › Xceed FTP for ActiveX › Runtime error
-
AuthorPosts
-
#42792 |
I am trying to use ftp library with VB6 to receive a file from Mainframe. If file exists on Mainframe it works fine. If it doesn’t exists it triggers runtime error even if I have on error statement. What am I doing wrong? Here is a test code:
On Error GoTo LocalError
xFTP.ServerAddress = “1.1.1.1”
xFTP.ServerPort = “21”
xFTP.UserName = “user”
xFTP.Password = “pass”
xFTP.Connect
‘ xFTP.RepresentationType = frtASCII
Call xFTP.ReceiveFile(“‘filename'”, 0, “c:\test.asc”)
MsgBox Err.Description
xFTP.DisconnectLocalError:
Call AddErrorMessage(Err.Number, Err.Description)
Imported from legacy forums. Posted by jack (had 6025 views)
It should not trigger a runtime error, but rather the ReceiveFile() method should return an error code.
Have you tried to handle the SkippingFile event, which is another way to get error codes, and know what’s happening? Here is more information from the help documentation :
http://doc.xceedsoft.com/products/XceedFtp/SkippingFile_event.html
Imported from legacy forums. Posted by André (had 742 views)
Andre,
Thank You very much for replying. Somehow SkippingFile event it’s not being triggered.
Imported from legacy forums. Posted by jack (had 784 views)
Do you get an error code returned by the ReceiveFile() method? If so, can you tell me what it is?
Imported from legacy forums. Posted by André (had 557 views)
Andre,
Private Sub xFTP_ReceivingFile(ByVal sRemoteFilename As String, sLocalFilename As String, ByVal lFileSize As Long)
‘
Call AddErrorMessage(err.Number, err.Description)If err.Number <> 0 Then
msgbox err.Number
End IfI am getting error 800400f
If the file exists on frp server everything works great. I don’t know if it makes a difference, but the FTP server is on mainframe.
End Sub
Imported from legacy forums. Posted by jack (had 953 views)
I suggest you set the CommandLogFilename property, so we can have a log of the communication with the server, and see if this helps identify the problem.
Imported from legacy forums. Posted by André (had 8371 views)
-
AuthorPosts
- You must be logged in to reply to this topic.