Bind Col All (Results Menu)

The Bind Col All function tool binds all the columns in a result set. If the Bind Bookmark Column control in the User Options dialog box is selected, and the SQL_ATTR_USE_BOOKMARKS statement attribute is set, Bind Col All will bind bookmark columns as well. This tool performs the following actions:

  1. Calls SQLFreeStmt with Option set to SQL_UNBIND to unbind any previously bound columns.

  2. Calls SQLNumResultCols to determine the number of columns in the result set.

  3. Calls SQLDescribeCol for each column in the result set to determine the data type and column size of the column. Based on the precision, it allocates a character buffer of up to the number of bytes specified with the Max Bind Col All Length box in the User Options dialog box.

  4. Calls SQLBindCol for each column in the result set to bind the column to a SQL_C_CHAR buffer.