I am trying to display a PDF file on a client computer through the RTC from a mapped drive on the server computer.
I am using HYPERLINK() which works sometimes and other times does not. I believe this is because the mapped folder is not ready to be accessed fast enough.
What could I do to force the mapped hard drive to be ready (perhaps save over a file each time?) then perhaps a <timer> function to wait 5 seconds or so to make sure it is ready before the HYPERLINK function? :-k
0
Comments
I don't believe it has to do with it accessing it fast enough.
Do you receive an error message?
If it doesn't open - go to My Computer & see if it says "Network Drive" or "Discontected Network Drive".
If it's disconnected you need to double click on it to reconnect.
I believe on your server, does it have file server role?, that you can set a setting on shared drives that does or does not disconnect login users depending on what you want. Or you can set a time limit.
http://www.BiloBeauty.com
http://www.autismspeaks.org
I am not sure how to do that. I see an example of FILE.OPEN in the Help files:
Variable: TestFile
Data type: File
TestFile.TEXTMODE(TRUE);
TestFile.WRITEMODE(FALSE);
TestFile.OPEN('C:\temp\simple.xml');
How do I alter this to display a PDF? I tried simply changing the file path to my PDF file and I got an I/O error.
In your example you would define a text variable, assign the UNC path to it, and pass it to the create call.
Variable: TestFile
Data type: File
Variable: FilePath
Data Type: Text (100)
FilePath := '\\fileshare\datafolder\simple.xml'
TestFile.TEXTMODE(TRUE);
TestFile.WRITEMODE(FALSE);
TestFile.OPEN(FilePath);
of course you need to specify a valid UNC path for your network. You can use Network Neighborhood to browse and then copy and paste the path