Select into a fixed binary host variable

To select the data that an opaque-type column contains into a fixed binary host variable, the code fragment in Accessing the internal format of the circle opaque data type with a fixed binary host variable takes the following steps:
  1. Selects the data that the circle_col opaque-type column contains into the fbin_circle host variable.

    When the database server executes the SELECT statement, it calls the send support function for circle (circle_snd) to perform any translation necessary between the internal format that it retrieved from disk and the internal format that the Informix® ESQL/C application uses. This SELECT statement also uses a user-defined function called radius (see Registering the circle opaque data type) to extract the radius value from the opaque-type column.

  2. Accesses the circle data from the fixed binary host variable.

    After the SELECT statement, the fbin_circle host variable contains data in the internal format of the circle data type. The code fragment obtains the value of the (x,y) coordinate from the members of the circle_t data structure.

When you select a null value from an opaque-type column into a fixed binary host variable, Informix ESQL/C sets any accompanying indicator variable to -1.