254 Can't read from drive d:
Problem: Getting error "Can't read from drive d:"
When opening a form or report.
Versions: All
Possible cause:
Most likely the application was developed on the drive D: that was home to the style sheets and then the application was moved to another machine where the style sheets did not reside on drive D:.
The style sheet file name used to develop a form is stored with the form in the .FSL file. If the style sheet was not in the working directory or the running directory, the full path of the style is stored. The fact it is the full path is important because it implies that the form will later need it to access this file.
When the form is opening, it reads the location of the style sheet and tries to access it. Usually if the style sheet file doesn't exist, the form doesn't care and there is no problem. But in this scenario, the D: drive isn't accessible and the error is coming from the code which is looking for the file. If the D: drive is there but the file isn't, it works fine (except the proto object isn't loaded). Also, if drive D: is a removable volume (such as CD-ROM, Bernoulli) and the "disk" is not inserted, the error will occur.
There are three ways to deal with this problem:
-Always use a relative path to the working directory when saving the style sheet name. The best way is to save it directly in the working directory. When the form using the style sheet is moved to a different location, always move the style sheet file with it and change the working directory to be the new location. This is how Paradox works the best, always move the full content of the working directory instead of specific files.
-The second solution is based on the fact that Paradox uses the notion of a "Running directory" which is the place where the executable files are located. This location is supposed to stay constant and can be used to store components the user might need across several Paradox applications. Here again the user has to specify this location when they save the style sheet. Another advantage of using the running directory is that the file will always show up in the list of available style sheets.
-The third solution is to use standard Paradox for Windows style sheets (such as DEFAULT.FT, OCEAN.FT, etc.), since most Paradox for Windows installation comes with these so they are usually located in the correct place.
In conclusion, the user should be careful when they save a style sheet.
Solution:
Insert a cd, then change the style sheet used by the form, Format | Style Sheet, and save the form.