Include_Text Command

See Also: Include_Resource

Purpose

Include_Text allows .SQL and other text files to be included as constants with a single line of DataFlex code.

Syntax

Include_Text fileName as resourceName

Argument Explanation

fileName The name of the resource file to embed in the compiled program. The contents of the file should be in UTF-8 format, as all source code. fileName may be between 1 and 4096 characters in length, must start with a letter, and may not contain spaces. Recommended characters are 0-9, a-z, A-Z and _ (underscore).

resourceName The name to associate with the embedded file. This name can be used as if defined like a Define or #REPLACE. This command creates resourceName as a constant.

What It Does

Include_Text allows .SQL and other text files to be included as constants with a single line of DataFlex code.

Example

This example creates the C_SQLUpdateCustomers constant, which can be used in code and contains the full contents of the file UpdateCustomers.sql.

Include_Text UpdateCustomers.sql as C_SQLUpdateCustomers

 

Variant vResult

 

Get SqlExecDirect of ghoSQLExecutor C_SQLUpdateCustomers to vResult

 

Notes