-423   INVALID VALUE FOR LOCATOR IN POSITION position-#

Explanation

The value specified in a result set locator host variable, a LOB locator host variable, or a table locator that is specified at position position-# in the locator variable list of the SQL statement does not identify a valid result set locator, LOB locator variable, or table locator, respectively.

System action

The statement cannot be processed.

Programmer response

For a result set locator there are two common causes for the error:
  • The host variable used as a result set locator was never assigned a valid result set locator value. Result set locator values are returned by the DESCRIBE PROCEDURE and ASSOCIATE LOCATORS statements. Make sure the value in your host variable is obtained from one of these statements.
  • Result set locator values are only valid as long as the underlying SQL cursor is open. If a commit or rollback operation closes an SQL cursor, the result set locator associated with the cursor is no longer valid.
For a LOB locator, some common causes for the error are:
  • The host variable used as a LOB locator was never assigned a valid LOB value.
  • A commit or rollback operation or an SQL FREE LOCATOR statement freed the locator.

For a table locator, the error commonly occurs when the host variable that was used as a table locator was never assigned a valid table locator value.

SQLSTATE

0F001