References to LOB or XML locator variables

Start of changeA LOB or XML locator variable is a variable that contains the locator representing a LOB or XML value on the application server.End of change

Start of changeLOB or XML locator variables can be defined in the following host languages:End of change

Start of changeSee Manipulating large objects with locators for information about how locators can be used to manipulate LOB and XML values.End of change

Start of changeA locator variable in an SQL statement must identify a LOB or XML locator variable described in the program according to the rules for declaring locator variables. This is always indirectly through an SQL statement. For example, in C: End of change

   static volatile SQL TYPE IS CLOB_LOCATOR *loc1;

Start of changeLike all other variables, a LOB or XML locator variable can have an associated indicator variable. Indicator variables for LOB or XML locator variables behave in the same way as indicator variables for other data types. When a null value is returned from the database, the indicator variable is set and the variable is unchanged. When the indicator variable associated with a LOB or XML locator is null, the value of the referenced LOB or XML is null. This means that a locator can never point to a null value.End of change

If a locator variable does not currently represent any value, an error occurs when the locator variable is referenced.

Start of changeAt transaction commit or any transaction termination, all LOB or XML locators that were acquired by the transaction are released.End of change

Start of changeIt is the application programmer's responsibility to guarantee that any LOB or XML locator is only used in SQL statements that are executed at the same application server that originally generated the LOB or XML locator. For example, assume that a LOB locator is returned from one application server and assigned to a LOB locator variable. If that LOB locator variable is subsequently used in an SQL statement that is executed at a different application server, unpredictable results will occur.End of change