To allocate an ESL variable for a column of data, call EDSBindCol and pass it the following information:
•The ESL data type to which the data is to be converted. For more information, see Converting Data from SQL to ESL Data Types
•An ESL variable of the same type in which to return the data
•An ESL integer variable in which to return the number of bytes of available data
If the result set is unknown, your application can use the information returned by these functions to bind the columns in the result set. To determine the characteristics of a result set, your application can:
•Call EDSNumResultCols to determine how many columns a request returned.
•Call EDSColAttributes or EDSDescribeCol to describe a column in the result set.
To retrieve a row of data from the result set, perform these steps:
1. Call EDSBindCol to bind the columns of the result set to ESL variables if it has not already done so.
2. Call EDSFetch to move to the next row in the result set and retrieve data for each bound column.
The figure below illustrates the operations an application uses to retrieve data from the result set.
Figure 2-5: Retrieving Data from a Result Set