Was this helpful?
Indicator Variables in Param Statements
You can code param statements to accommodate data assigned to or from nullable columns and form fields. The syntax is analogous to that previously described, with the exception that, in the target string, type indicators are needed in place of both the data variable and the indicator variable. Since indicator variables are always 2-byte integers, you can use the i2 type indicator used for this purpose. A sample target list of a param retrieve statement, including indicator variables, might look like this:
targ_list = "%c:%i2=e.empname, %f8:%i2=e.salary";
The var_address_array corresponding to this target list needs four cells, initialized in the following order:
1. A character-string pointer
2. A pointer to a short
3. A pointer to a double
4. Another pointer to a short
When the retrieve statement executes, one or both of the short variables can contain the value -1 if null data were present in that row of the table.
Last modified date: 06/10/2024