Welcome to the Xceed Community | Help
Community Search  

Runtime error

Sort Posts: Previous Next
  •  09-18-2008, 11:37 AM Post no. 15408

    Runtime error

    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.Disconnect

    LocalError:
      Call AddErrorMessage(Err.Number, Err.Description)
      
     

     

     

  •  09-18-2008, 4:49 PM Post no. 15418 in reply to 15408

    Re: Runtime error

    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


    André
    Software Developer and Tech Support
    Xceed Software Inc.
  •  09-19-2008, 11:40 AM Post no. 15446 in reply to 15418

    Re: Runtime error

    Andre,

     Thank You very much for replying.  Somehow SkippingFile event it's not being triggered.  

     

     

  •  09-19-2008, 2:53 PM Post no. 15453 in reply to 15446

    Re: Runtime error

    Do you get an error code returned by the ReceiveFile() method?  If so, can you tell me what it is?
    André
    Software Developer and Tech Support
    Xceed Software Inc.
  •  09-19-2008, 3:56 PM Post no. 15457 in reply to 15453

    Re: Runtime error

    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 If

    I 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

  •  09-22-2008, 3:12 PM Post no. 15520 in reply to 15457

    Re: Runtime error

    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.
    André
    Software Developer and Tech Support
    Xceed Software Inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.