SQLColAttributes() - Get column attributes

SQLColAttributes() is a deprecated function and is replaced by SQLColAttribute().

ODBC specifications for SQLColAttributes()

Table 1. SQLColAttributes() specifications
ODBC specification level In X/Open CLI CAE specification? In ISO CLI specification?
1.0 (Deprecated) No No

Syntax

SQLRETURN   SQLColAttributes (SQLHSTMT          hstmt,
                              SQLUSMALLINT      icol,
                              SQLUSMALLINT      fDescType,
                              SQLPOINTER        rgbDesc,
                              SQLSMALLINT       cbDescMax,
                              SQLSMALLINT FAR   *pcbDesc,
                              SQLINTEGER  FAR   *pfDesc);

Function arguments

The following table lists the data type, use, and description for each argument in this function.

Table 2. SQLColAttributes() arguments
Data type Argument Use Description
SQLHSTMT hstmt input Statement handle.
SQLUSMALLINT icol input Column number in the result set (must be between 1 and the number of columns in the result set, inclusive). This argument is ignored when SQL_COLUMN_COUNT is specified.
SQLUSMALLINT fDescType input The supported values are described in the SQLColAttribute() function description.
SQLCHAR * rgbDesc output Pointer to buffer for string column attributes.
SQLSMALLINT cbDescMax input Specifies the length, in bytes, of rgbDesc descriptor buffer.
SQLSMALLINT * pcbDesc output Actual number of bytes that are returned in rgbDesc buffer. If this argument contains a value equal to or greater than the length that is specified in cbDescMax, truncation occurred. The column attribute value is then truncated to cbDescMax bytes, minus the size of the nul-terminator (or to cbDescMax bytes if nul-termination is off).
SQLINTEGER * pfDesc output Pointer to an integer that holds the value of numeric column attributes.