Loads the content of a text file into any text control or text variable (string variable, edit control in a window, Static control in a report, etc.). fSaveBuffer
is used to extract this file from the buffer.
<Result> = fLoadText(<Name and path of text file> [, <Load mode>])
<Result>: Character string
- Content of text file,
- Empty string ("") if an error occurred. To get more details on the error, use ErrorInfo.
<Name and path of text file>: Character string
Name and full (or relative) path of the text file. A UNC path can be used. This file is not necessarily a file in TXT format: indeed, the binary zeros are allowed.
<Load mode>: Integer constant
Load mode of the file:
|foAnsi||Ansi file. In this case, <Result> will correspond to an Ansi character string.|
|foUnicode||Unicode file. In this case, <Result> will correspond to an Unicode character string.|New in version 28
This parameter is not supported. The returned format corresponds to the format supported by the current platform.
Business / UI classification: Business Logic