Using the SQLDA Data Structure

When the number or datatypes of host variables to be passed are unknown at compile time, use the SQL descriptor area (SQLDA) data structure instead of host variables. You can use the SQLDA data structure to define the type of data to be passed from the database to the host variable, or vice versa. The SQLDA data structure is generally used with question marks (?) as parameter markers to specify input values for prepared SQL statements. You can also use the SQLDA data structure with the DESCRIBE or PREPARE INTO statements to receive data from a prepared SELECT statement. Although you cannot use the SQLDA data structure with static SQL statements, you can use it with a cursor FETCH statement, regardless of whether the cursor is dynamic or static.