Help Center

CODBCStmt.GetColumnsmethod

Returns the list of column names in specified tables.

DatabasesmethodCODBCStmt.incdocumented

Syntax

FUNCTION GetColumns (BYREF wszCatalogName AS WSTRING, BYVAL CatalogNameLength AS SQLSMALLINT, BYREF wszSchemaName AS WSTRING, BYVAL SchemaNameLength AS SQLSMALLINT, BYREF wszTableName AS WSTRING, BYVAL TableNameLength AS SQLSMALLINT, BYREF wszColumnName AS WSTRING, BYVAL ColumnNameLength AS SQLSMALLINT) AS SQLRETURN

Parameters

NameDescription
wszCatalogNameCatalog name. If a driver supports names for some catalogs but not for others,such as when the driver retrieves data from different DBMSs, an empty string ("") denotes those catalogs that do not have names. wszCatalogName cannot contain a string search pattern.
CatalogNameLengthLength of wszCatalogName.
wszSchemaNameString search pattern for schema names. If a driver supports schemas for some tables but not for others, such as when the driver retrieves data from different DBMSs, an empty string ("") indicates those tables that do not have schemas.
SchemaNameLengthLength of wszSchemaName.
wszTableNameString search pattern for table names.
TableNameLengthLength of wszTableName.
wszColumnNameString search pattern for column names.
ColumnNameLengthLength of wszColumnName.

Return value

SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_STILL_EXECUTING, SQL_ERROR, or SQL_INVALID_HANDLE.

Description

Returns the list of column names in specified tables. The driver returns this information as a result set on the specified statement handle.

Reference

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