Home | Previous Page | Next Page   SQL Statements >

DESCRIBE

Use the DESCRIBE statement to obtain information about output parameters and other features of a prepared statement before you execute it. Use this statement with ESQL/C. (See also DESCRIBE INPUT.)

Syntax

Read syntax diagramSkip visual syntax diagram>>-DESCRIBE--+--------+--+-statement_id_var-+------------------->
             '-OUTPUT-'  '-statement_id-----'
 
>--+-USING--SQL DESCRIPTOR--+-descriptor_var-+----+------------><
   |                        '-'descriptor'---'    |
   '-INTO--+-SQL DESCRIPTOR--+-descriptor_var-+-+-'
           |                 '-'descriptor'---' |
           '-sqlda_pointer----------------------'
 
Element Description Restrictions Syntax
descriptor Name of a system-descriptor area System-descriptor area must already be allocated Quoted String
descriptor_var Host variable specifying a system-descriptor area Must contain the name of an allocated system-descriptor area Language-specific rules for names
sqlda_pointer Pointer to an sqlda structure Cannot begin with dollar ( $ ) sign or colon ( : ). An sqlda structure is required if dynamic SQL is used. See the sqlda structure in the IBM Informix ESQL/C Programmer's Manual
statement_id Statement identifier for a prepared SQL statement Must be defined in a previous PREPARE statement PREPARE;
Identifier
statement
_id_var
Host variable that contains the value of statement_id Must be declared in a previous PREPARE statement Language-specific rules for names

Usage

DESCRIBE can provide information at runtime about a prepared statement:

With this information, you can write code to allocate memory to hold retrieved values and display or process them after they are fetched.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]