Error Messages/40048

< Error Messages
Revision as of 22:19, 21 March 2016 by Bbecane (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Error text

ReadTextFile cannot open the file "c:\data\readings.txt" for reading.

Cause

The file requested in the parameter to ReadTextFile does not exist.

If you provide just a file name, without a full absolute file path, then the file is interpreted relative to the CurrentDataFolder(). So one cause is that your file is in the wrong folder, or your CurrentDataFolder is not set how you expect. One option is to provide a full absolute file path.

Remedies

The «showDialog» parameter to ReadTextFile controls whether a File Open dialog appears. If you haven't set this parameter, then it will show up when the file isn't found before this error is displayed. If the user actually selects this file, this error will be averted. If he cancels without selecting, then this error will appear.

If you set «showDialog» to false, then the user will not have an opportunity to find the file himself. In that case, you will have to put the file in place, or edit the filename provided to the function.

Note: There is no way to "catch" this error within conditional logic.

See Also

Comments


You are not allowed to post comments.