SQLColAttributes (Visual FoxPro ODBC Driver)

Note

This article contains Visual FoxPro ODBC Driver-specific information. For general information about this function, see the appropriate article under ODBC API Reference.

Support

Full.

ODBC API conformance

Core level.

Remarks

Returns descriptor information for a column in a result set. Descriptor information is returned as a character string, a 32-bit descriptor-dependent value, or an integer value.

Note

SQLColAttributes can't be used to return information about the bookmark column (column 0).

The Visual FoxPro ODBC Driver supports all fDescType values. The following table includes comments on the driver's implementation of selected values.

fDescType Comment
SQL_COLUMN_AUTO_INCREMENT Returns FALSE: Visual FoxPro has no counter fields.
SQL_COLUMN_CASE_SENSITIVE Always returns TRUE if the column type is Character.
SQL_COLUMN_LABEL Returns the column name, which is also returned by SQL_COLUMN_NAME.
SQL_COLUMN_MONEY Returns TRUE if the column type is Currency (represented by a Y in the Visual FoxPro language).
SQL_COLUMN_OWNER_NAME Always returns an empty string.
SQL_COLUMN_QUALIFIER_NAME Always returns an empty string.
SQL_COLUMN_SEARCHABLE Returns SQL_UNSEARCHABLE for columns of type General; these columns can't be used in a WHERE clause.

Returns SQL_SEARCHABLE for columns of type Character or Memo with NOCPTRANS not set; these columns can be used in a WHERE clause with any comparison operator.

Returns SQL_ALL_EXCEPT_LIKE for all other column types; these columns can be used in a WHERE clause with all comparison operators except LIKE.
SQL_COLUMN_TABLE_NAME Always returns an empty string.

For more information, see SQLColAttributes Function in the ODBC Programmer's Reference.