Help Center

CODBCStmt.ColNamemethod

Returns the column alias, if it applies.

DatabasesmethodCODBCStmt.incdocumented

Syntax

FUNCTION ColName (BYVAL ColNum AS SQLUSMALLINT) AS DWSTRING

Parameters

NameDescription
ColNumColumn number.

Return value

The column alias or name.

Result code (GetLastResult)

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

Description

The column alias, if it applies. If the column alias does not apply, the column name is returned. In either case, SQL_DESC_UNNAMED is set to SQL_NAMED. If there is no column name or a column alias, an empty string is returned and SQL_DESC_UNNAMED is set to SQL_UNNAMED. This information is returned from the SQL_DESC_NAME record field of the IRD.

Reference

  • Include file CODBCStmt.inc
  • Defined in AfxNova/COdbcStmt.inc:998
  • Documented in Databases/ODBC Classes/CODBCStmt Class.md
  • Topic: CODBCStmt Class