Why are bound columns better than unbound columns?
This is a very important point for performance. There are many ways to generate a result set using the CLI. One can execute a SELECT statement; one can use the catalog functions, such as SQLTables and SQLColumns; one can execute a CALL statement to a stored procedure that has one or more result sets. When the application is ready to retrieve the data from the result set, it can bind each of the columns to a variable in the application and start using SQLFetch to process each row. This is the recommended approach. For each column in the result set, one should use SQLBindCol to bind each and every column. The SQLNumResultCols procedure can be used to determine how many columns are in the result set, and either SQLColAttributes or SQLDescribeCol can be used to determine the data type of each column. Going through this process results in “bound” columns. This means that when the SQLFetch is processed, the application has already done SQLBindCol for every column, so the CLI knows the addres