Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why are bound columns better than unbound columns?

bound columns Unbound
0
Posted

Why are bound columns better than unbound columns?

0

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

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123