1. Lloyd McBean
  2. PowerBuilder
  3. Friday, 06 September 2019

I have a PB2017 application working over RDP using TSPlus (An RDP Alternative) and which works extremely well.  I am now testing an integration which requires saving files from the RDP session to drives on the client-side.  FileOpen calls fail every time with -1.  Even FileExist(filename) fails everytime.

This PB application works perfectly when the run locally. 

I have checked security (Everyone is given access to the folder in question). 

What could be causing this file i/o issue? 

Part of the app allows export to Excel, and this actually creates the file on the client-side but writes at an extremely slow rate.  Am I missing something?

Who is viewing this page
Accepted Answer
Lloyd McBean Accepted Answer Pending Moderation
2
Votes
Undo

Solved.

When mapping file paths form RDP Clients the drive needs to be mapped as follows:

Local Drive Letter R:

Local Folder: folder_name

Path mapping 
\\tsclient\R\folder_name\

Comment
THX for sharing your solution to everyone's future benefit. Appreciate! /Michael
  1. Michael Kramer
  2. Saturday, 7 September 2019
There are no comments made yet.
  1. Saturday, 7 September 2019
  2. PowerBuilder
  3. # Permalink
Lloyd McBean Accepted Answer Pending Moderation
0
Votes
Undo

Thanks Chris for the response.

I have set full read-write to Everyone just to be sure.

Even the FileExist function fails.

Comment
There are no comments made yet.
  1. Friday, 6 September 2019
  2. PowerBuilder
  3. # 1
Chris Pollach Accepted Answer Pending Moderation
0
Votes
Undo

Hi Lloyd;

   I wonder if the file permissions are currently "read only" whereas, your App needs "write" permission as well on the target drive & folder?

Regards ... Chris

Comment
ok. So I solved it. when connecting via the RDP client the mapping is different.

Example mapping to R: Drive on client, the drive needs to be mapped as follows:

\\tsclient\R\folder\filename.xyz.



I used the GetFolder function to reveal what the application was reading when browsing and picking up the path.

Problem Solve!

Thanks.



  1. Lloyd McBean
  2. Saturday, 7 September 2019
If Excel & SaveAs() command can work - then the FileOpen & FileExists commands should also work.

BTW: when you compiled the EXE, did you include a Manifest (Project Painter)?
  1. Chris Pollach
  2. Saturday, 7 September 2019
Excellent .. great detective work Lloyd!
  1. Chris Pollach
  2. Saturday, 7 September 2019
There are no comments made yet.
  1. Friday, 6 September 2019
  2. PowerBuilder
  3. # 2
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.