Assigning Storage (Binding)

An application can assign storage for results before or after it executes an SQL statement. If an application prepares or executes the SQL statement first, it can inquire about the result set before it assigns storage for results. For example, if the result set is unknown, the application must retrieve the number of columns before it can assign storage for them.

To associate storage for a column of data, an application calls SQLBindCol and passes it the following information:

An application can also bind result set columns to arrays of program variables to support fetching result set rows in blocks. There are two different types of array binding:

The application also sets SQL_ATTR_ROW_ARRAY_SIZE to the number of elements in the column or row arrays, and sets SQL_ATTR_ROW_STATUS_PTR and SQL_ATTR_ROWS_FETCHED_PTR.

To process results

See Also
SQLBindCol SQLSetStmtAttr

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.