USFile.ReadBinaryFile

Previous Next

Reads a complete file in binary mode. Returns the data contained in the file.

Syntax 1

INVOKE USFile.ReadBinaryFile WITH

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.ReadBinaryFile with an alias" section below.

 

Syntax 2

INVOKE  USFile.ReadBinaryFile 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.ReadBinaryFile with a filepath" section below.

 

Examples

INVOKE   USFile.ReadBinaryFile WITH

SELECT   'USFile.MyOverview'

 

UPDATE   tours_backup

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

WHERE    id = 1

 

UPDATE   tours_backup

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

WHERE    id = 1

 

 

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

 

 

See Also

USFile.ReadLine

USFile.ReadTextFile

USFile Internal Component