1. JIAYONG HONG
  2. PowerBuilder
  3. Tuesday, 28 May 2024 05:03 AM UTC

Hi, when I using the Components, I got an error message about FTP upload function as attached.

Can anyone tell me how can I solve this problem ?

Thanks

Hong

Attachments (1)
References
  1. https://community.appeon.com/index.php/codeexchange/powerbuilder/349-components-app#507
Andreas Mykonios Accepted Answer Pending Moderation
  1. Wednesday, 29 May 2024 06:19 AM UTC
  2. PowerBuilder
  3. # 1

Hi.

From what I see, in Download button, there is the following code:

wf_SetStatusIndicators(false)

wf_DownloadFile(tab_details.tab_download.sle_filepath.Text, is_selectedFileName)

The second argument (is_selectedFileName) has a value only when you first execute an upload. When you first execute the download, it should be empty. Don't know if this is the only issue, but I would first try to give a valid value to that variable when pressing the download button. But this may not be the only issue.

Andreas.

Comment
There are no comments made yet.
Francisco Martinez @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 28 May 2024 17:51 PM UTC
  2. PowerBuilder
  3. # 2

Hi Jiahong,

 

I think there is a bug in the demo, I can also get it to crash by attempting an upload. However, if I first download a file and then try uploading, the error doesn't occur. Please try to do the same and let me know if that works around the issue.

Regards,
Francisco

Comment
  1. JIAYONG HONG
  2. Wednesday, 29 May 2024 00:46 AM UTC
As you say, if I first download a file and then try uploading will work.



What's different between upload and download? this bug in demo can be fixed?
  1. Helpful
  1. Francisco Martinez @Appeon
  2. Wednesday, 29 May 2024 14:14 PM UTC
The demo can be fixed, but you need to download the C# code first. You can get it from here: https://github.com/Appeon/PowerBuilder-Components-Example

You will need to edit the file [C# Solution/FtpClientWrapper/FtpClientWrapper.cs] and move line 150 before line 124 so that this line is before the call to the UploadFileInternal(...) method.

After doing this change, publish the FtpClientWrapper, and copy the resulting DLLs into the PB project's bin\ directory, replacing the previous files.

This is all that's needed to fix the issue, the fix will most likely be deployed with the next version of the Components Demo App
  1. Helpful 3
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Tuesday, 28 May 2024 08:35 AM UTC
  2. PowerBuilder
  3. # 3

Hi.

What exactly are you doing? Are you trying to use FtpClientWrapper from a powerbuilder application? I'm asking that because the point you receive the error is the point where the assembly tries to call back a pb application. If you are calling it from pb application, is it the demo application provided by appeon, or one you created?

Andreas.

Comment
  1. JIAYONG HONG
  2. Tuesday, 28 May 2024 09:31 AM UTC
Thanks for your reply.

Yes, I'm using FtpClientWrapper from powerbuilder application.

I want to use the demo application to upload file. But somethings is not work as attached.

Just run the demo application also have same problem

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.