Declaration of large object locator type host variables in C and C++ embedded SQL applications

Large object (LOB) locator 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 large object (LOB) locator host variables in C or C++ is:

Read syntax diagramSkip visual syntax diagramautoexternstaticregisterconstvolatileSQL TYPE ISBLOB_LOCATORCLOB_LOCATORDBCLOB_LOCATOR,Variable
Variable
Read syntax diagramSkip visual syntax diagram*&constvolatilevariable-name= init-value
Read syntax diagramSkip visual syntax diagram;
LOB locator host variable considerations:
  1. SQL TYPE IS, BLOB_LOCATOR, CLOB_LOCATOR, DBCLOB_LOCATOR can be in mixed case.
  2. init-value permits the initialization of pointer and reference locator variables. Other types of initialization will have no meaning.

CLOB locator example (other LOB locator type declarations are similar):

Declaration:
  SQL TYPE IS CLOB_LOCATOR my_locator;
Results in the generation of the following declaration:
  sqluint32 my_locator;