Welcome to the Xceed Community | Help
Community Search  
More Search Options

I am using the Xceed FTP Library in PowerBuilder, however I am not able to trap the errors returned by the Xceed FTP Library. Is it possible to retrieve these errors?

Sort Posts: Previous Next
  •  10-10-2008, 11:21 AM Post no. 28447

    I am using the Xceed FTP Library in PowerBuilder, however I am not able to trap the errors returned by the Xceed FTP Library. Is it possible to retrieve these errors?

    When an error occurs, PowerBuilder will trigger two events: error and externalexception. The externalexception event will contain the error number and description as documented in the Xceed FTP Library. To map the Powerbuilder error number to the documentation error number, just convert the last four digits of the number in the documentation from hex to decimal, and this is what you will see in Powerbuilder.

    In the error event put the following, to ignore any errors:

    // Skip the automatic Powerbuilder error message
    action = ExceptionIgnore!

    In the externalexception event put the following to trap and store any errors generated by the FTP Library control:

    // Instance variables to be checked by the calling function
    il_ftp_errornumber = resultcode
    is_ftp_errortext = description

    // Connect
    ole_ftp.Object.Connect()
    if il_ftp_error_number <> 0 then
    MessageBox("Error", "Connect failed: " + String(il_ftp_errornumber) + ",
    " + is_ftp_errortext)
    return
    end if


    ***Information provided by Aron Cox!***
    *Keep in mind that PowerBuilder is not officially support by Xceed*
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.