SQLDescribeCol

This function returns the result descriptor information (column name, type, precision) for the indicated column in the result set generated by a SELECT statement.

Syntax :

RETCODE  SQLDescribeCol(hstmt,icol,colName, lenColmaneMax, pcbColName,pfSqlType,pcbColDef,pibScale, pfNullable);

Arguments:

The arguments for SQLDescribeCol are listed in below table.

TypeNameDescription
SQLHSTMThStmtStatement handle
SQLSMALLINTicolColumn number to be described
SQLCHAR*colNamePointer to column name buffer
SQLSMALLINTlenColmaneMaxSize of colName buffer
SQLSMALLINT*pcbColNameBytes available to return for szColName argument Truncation of column name (szColName) to cbColNameMax - 1 bytes occurs
SQLUINTEGER*pfSqlTypeSQL data type of column
SQLINTEGER*pcbColDefPrecision of column as defined in the database
SQLINTEGER*pibScaleScale of column as defined in the database
SQLINTEGER*pfNullableThis indicates whether NULLS are allowed for this column. SQL_NO_NULLS or SQL_NULLABLE
Page last modified on September 25, 2009, at 12:34 PM