GetColumnHeader()


" "

BSTR GetColumnHeader(long QueryID, short Index, short* Result)

Description

This function returns the column header (column name) associated with the parameter Index.

Parameters

Name Description
QueryID The ID of the query, as returned from InitializeQuery().
Index The zero-based index of the column header to be retrieved.
Result

The string returned represents the column name as specified in the Index parameter.

Note:
Column headings are not available for static SQL statements. For query IDs returned from InitializeStaticQuery(), GetColumnHeader() returns a string of the form "Coln" where "n" is the column number.

Return Value

The return value will be zero if successful or non-zero if unsuccessful. If Result is non-zero, you can call GetLastErrorString(), GetLastErrorType(), GetLastSQLCode(), GetLastSQLError(), or GetLastSQLState() to get additional error information.

Related Tasks

GetColumnHeaderEx()
GetColumnHeadings()