Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Programming » SQL Anywhere Embedded SQL » Using host variables » Indicator variables

Using indicator values for conversion errors Next Page

Summary of indicator variable values


The following table provides a summary of indicator variable usage.

Indicator value Supplying value to database Receiving value from database
> 0 Host variable value Retrieved value was truncated—actual length in indicator variable
0 Host variable value Fetch successful, or conversion_error set to On
-1 NULL value NULL result
-2 NULL value Conversion error (when conversion_error is set to Off only). SQLCODE indicates a CANNOT_CONVERT warning
< -2 NULL value NULL result

For more information about retrieving long values, see GET DATA statement [ESQL].