Home Forums ActiveX components Xceed FTP for ActiveX 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?

Viewing 1 post (of 1 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #42856 |

    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*

    Imported from legacy forums. Posted by Xceed admin (had 1697 views)

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.