1. CJ Lai
  2. PowerServer 2020 or older (Obsolete)
  3. Thursday, 14 May 2020 20:23 PM UTC

Hi 

I have script in my Client/Server-turn-Web/Mobile application to 'see' directories on any file servers that are in our company's network. The app worked great in 2017 R3

Onto 2019 R2.

I understand that some of PowerBuilder File Functions are unsupported in PowerServer ('ChangeDirectory', 'CreateDirectory', 'DirectoryExists'.... according to this post - https://bit.ly/2zBua8f)

I am looking for a work-around for those. If you have a good substitute for any of the above, please share.

In the meantime, I just hard-coded a local C:\ drive location to dw_1.SaveAs a PDF file to, it worked. I got a PDF file in the said folder.

However, if I change the file location to a file server \\servername\folder1\folder2\filename.PDF, then the SaveAs would fail.

Why? What should I do to SaveAs a PDF onto a file server?

Thank you!

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 14 May 2020 21:26 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # Permalink

Hi CJ;

  UNC based paths are not supported in PowerServer. Only Mapped drives.

  Here are a few workarounds that I use (FWIW), as follows:

1) Use PowerServer's FTP feature to move the PDF created locally to an Server's landing pad.

2) Create a Web Service in IIS that creates the PDF on the Server side and save it to a Server's folder.

3) Create a RESTFul Web Service (C#Web API) that allows the PDF file transfer and then saves it to a folder on the server side.

4) Save the PDF to a BLOB in the DB. Then have a server side App pick it up from the Blob column in the DB and deposit it where you need it.

Food for thought.  HTH

Regards ... Chris

Comment
  1. CJ Lai
  2. Friday, 5 June 2020 19:37 PM UTC
I am utilizing PowerServer's File Service to move around my files between Web Server and File Servers. Thank you, Chris, for your suggestions!
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 5 June 2020 19:42 PM UTC
You are most welcome!
  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.