IBM® Informix® Client Software Development Kit, Version 4.10

The GET DESCRIPTOR statement

The GET DESCRIPTOR statement obtains values from the system-descriptor-area fields.

You can use the GET DESCRIPTOR statement to:
  • Get the COUNT field to determine how many values are described in a system-descriptor area.
    EXEC SQL get descriptor sysdesc :hostvar=COUNT;
  • Get the item-descriptor fields for each described column.
    EXEC SQL get descriptor sysdesc VALUE :item_num
       :hostvar=DESCRIP_FIELD;

    In this example, item_num is the number of the item descriptor that corresponds to the desired column, and DESCRIP_FIELD is one of the item-descriptor fields listed in Table 1.

    These item-descriptor values are typically descriptions of columns in a SELECT, INSERT, or EXECUTE FUNCTION statement. GET DESCRIPTOR is also used after a FETCH...USING SQL DESCRIPTOR to copy a column value that is returned by the database server from the system-descriptor area into a host variable (Put column values into a system-descriptor area).

The data type of the host variable must be compatible with the type of the associated system-descriptor area field. When you interpret the TYPE field, make sure that you use the data type values that match your environment. For some data types, X/Open values differ from IBM® Informix® values. For more information, see Determine the data type of a column.

For more information about how to get individual system-descriptor fields, see the entry for the GET DESCRIPTOR statement in the IBM Informix Guide to SQL: Syntax.


Examples exchange | Troubleshooting

To find the PDF, see Publications for the IBM Informix 12.10 family of products.
For the release notes, documentation notes, and/or machine notes, see the Release Notes page.