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

SQL Anywhere 12.0.0 (Français) » UltraLite - C and C++ Programming » Application development » Developing applications using embedded SQL » Using host variables

 

Using indicator variables

Indicator variables are C variables that hold supplementary information about a particular host variable. You can use a host variable when fetching or putting data. Use indicator variables to handle NULL values.

An indicator variable is a host variable of type a_sql_len that is placed immediately following a regular host variable in a SQL statement. To detect or specify a NULL value, place the indicator variable immediately following a regular host variable in a SQL statement.

 Example
Note

To allow for the future use of 32 and 64-bit lengths and indicators, the use of short int for embedded SQL indicator variables is deprecated. Use a_sql_len instead.

 Indicator variable values

Using indicator variables to handle NULL