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

Specifying a Pointer to an sqlda Structure (ESQL/C)

If you do not know the number of parameters to be supplied at runtime, or their data types, you can associate input values from an sqlda structure. An sqlda structure lists the data type and memory location of one or more values to replace question-mark ( ? ) placeholders.

Use the DESCRIPTOR keyword to introduce a pointer to the sqlda structure as the location of the parameters.

The sqlda value specifies the number of input values that are described in occurrences of sqlvar. This number must correspond to the number of dynamic parameters in the prepared statement.

Example of Specifying a Pointer to an sqlda Structure

The following example shows an OPEN ... USING DESCRIPTOR statement:

struct sqlda *sdp;
...
EXEC SQL open selcurs using descriptor sdp;
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]