Previous Next

Reads a complete file in text mode. Returns a sequence of human-readable characters.

Syntax 1


SELECT   USFile.alias


The required alias must be the alias that was associated with the file to be read when the file was opened by calling the USFile.Open method.

Alias in this syntax must be preceded by the prefix "USFile." (ending in a full stop), which is a hard-coded string. Both prefix and alias are case-insensitive.

For more details, see the "Calling USFile.ReadTextFile with an alias" section below.


Syntax 2

INVOKE  USFile.ReadTextFile WITH

SELECT  filepath


The required filepath is the name of the file to read. This name is allowed to contain environment variables.

For more details, see the "Calling USFile.ReadTextFile with a filepath" section below.



INVOKE   USFile.ReadTextFile WITH

SELECT   'USFile.MyOverview'


UPDATE   tours_backup

SET      tours_pdf = USFile.ReadTextFile( 'USFile.MyOverview' )

WHERE    id = 1


UPDATE   tours_backup

SET      tours_pdf = USFile.ReadTextFile( '%TEMP%\ToursOverviewFile.pdf' )

WHERE    id = 1



collapseCalling USFile.ReadTextFile with an alias
collapseCalling USFile.ReadTextFile with a filepath



See Also



USFile Internal Component