1. Jonatan Lozano
  2. PowerBuilder
  3. Thursday, 17 October 2024 10:26 AM UTC

Good morning,

I have an application developed in PowerBuilder 9.0. that executes GetFileOpenName() function with which the user select a file. After, I create an XML file that contain the path selected. Then, I run a file .exe passing as a parameter this XML. 

If I generate the XML inserting the path, manually, like string

string a = "C:\....\file.pdf"

string XML = "<PATH> a </PATH>"

it works fine.

 

But, if I use the function GetFileOpenName("Select File", docpath, docname) and assign string a = docpath, it doesn't work.

Apparently the string stores the correct path.

I think GetFileOpenName function is not compatible with the exe.

Can you help me? Do you know any solution about this problem?

Accepted Answer
Arthur Hefti Accepted Answer Pending Moderation
  1. Thursday, 17 October 2024 12:06 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi

Just a guess: 

GetFileOpenName changes the current working folder. Try GetCurrentDirectory to save the current working folder and do a ChangeDirectory after the GetFileOpenName.

Regards
Arthur

Comment
There are no comments made yet.
Jonatan Lozano Accepted Answer Pending Moderation
  1. Thursday, 17 October 2024 12:21 PM UTC
  2. PowerBuilder
  3. # 1

Thank you Arthur,

I'm noob in Powerbuilder and I didn't know about this problem with GetFileOpenName function.

I made this change and now it's working.

best regards,

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