Declaration of file reference type host variables in C and C++ embedded SQL applications
File reference type
host variables that you declare in your embedded C or C++ application
are treated as if they were declared in a C or C++ program. You can
use host variables to exchange data between the embedded application
and the database manager.
The syntax for declaring file reference host variables in C or C++ is:
Note: SQL TYPE IS, BLOB_FILE, CLOB_FILE, DBCLOB_FILE
can be in mixed case.
CLOB file reference example (other LOB file reference type declarations are similar):
Declaration:
static volatile SQL TYPE IS BLOB_FILE my_file;
Results in the generation of the following structure:
static volatile struct {
sqluint32 name_length;
sqluint32 data_length;
sqluint32 file_options;
char name[255];
} my_file;
Note: This structure is equivalent
to the sqlfile structure located in the sql.h header. See Figure 1 to refer to the syntax diagram.