Export (0) Print
Expand All

How to: Use Data-at-Execution Columns (ODBC)

To use data-at-execution text, ntext, or image columns

  1. For each data-at-execution column, put special values into the buffers previously bound by SQLBindCol:

    • For the last parameter, use SQL_LEN_DATA_AT_EXEC(length) where length is the total length of the text, ntext, or image column data in bytes.

    • For the fourth parameter, put a program-defined column identifier.

  2. Calling SQLSetPos returns SQL_NEED_DATA, which indicates that data-at-execution columns are ready for processing.

  3. For each data-at-execution column:

    • Call SQLParamData to get the column array pointer. It will return SQL_NEED_DATA if there is another data-at-execution column.

    • Call SQLPutData one or more times to send the column data, until length is sent.

  4. Call SQLParamData to indicate that all the data for the final data-at-execution column is sent. It will not return SQL_NEED_DATA.

Community Additions

ADD
Show:
© 2014 Microsoft