General information
Category:
Coding, syntax & commands
Title:
Sys(2023) returning weird values
Has anybody encountered situations where SYS(2023) is occasionally not returning a valid temporary folder?
I'm running situation where value could be:
1. blank
2. somewhere in c:\windows\ (or any of the protected directories)
3. sometimes a non-existent folder (usually looking like a portion of a directory name -- e.g. "indows\te")
It seems to be occurring when:
a. it is called within multithreaded DLL
b. it is called in regular application code being run in a remote desktop session
If I try looking at the TEMP environment variable with GETENV(), I'm getting the same sort of results I'm getting with SYS(2023).
For the time being, I've added a kludge so that application code checks to see if SYS(2023) returns invalid folder -- when such a situation is detected, it uses JUSTPATH() to get the folder of one of the tables it happens to have open at that point and use that folder as the temporary folder. It did work around the immediate problem (was frequently getting "access denied" errors before the kludge was added), though the tradeoff has been that now the data folders gets cluttered with temporary files.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only