Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements >

DESCRIBE INPUT

Use the DESCRIBE INPUT statement to return input parameter information before a prepared statement is executed.

Only Dynamic Server supports this statement. Use this statement with ESQL/C.

Syntax

Read syntax diagramSkip visual syntax diagram>>-DESCRIBE INPUT--+-statement_var-+---------------------------->
                   '-statement_id--'
 
>--+-USING--SQL DESCRIPTOR--+-'descriptor'---+----+------------><
   |                        '-descriptor_var-'    |
   '-INTO--+-SQL DESCRIPTOR--+-'descriptor'---+-+-'
           |                 '-descriptor_var-' |
           |  (1)                               |
           '--------sqlda_pointer---------------'
 
Notes:
  1. Informix extension
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 previously executed PREPARE statement PREPARE;
PREPARE;
Identifier
statement_var Host variable that contains the value of statement_id Variable and statement_id both must be declared Language-specific rules for names

Usage

The DESCRIBE INPUT and the DESCRIBE OUTPUT statements can return information about a prepared statement to an SQL Descriptor Area (sqlda):

Tip:
Dynamic Server versions earlier than 9.40 do not support the INPUT keyword. For compatibility with legacy applications, DESCRIBE without INPUT is supported. In new applications, you should use DESCRIBE INPUT statements to provide information about dynamic parameters in the WHERE clause, in subqueries, and in other syntactic contexts where the old form of DESCRIBE cannot provide information.

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

The IFX_UPDDESC environment variable does not need to be set before you can use DESCRIBE INPUT to obtain information about an UPDATE statement.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]