Knowledge Base

BUG: SQLColAttribute Reports Base Type on Aggregate Function

Article ID: 143227

Article Last Modified on 12/3/2003


APPLIES TO


This article was previously published under Q143227
BUG#: 12951 (4.21a)

SYMPTOMS

If an ODBC application issues a SELECT that performs an aggregate function (such as AVG, SUM, MAX, and so forth) on a column that was defined with a user-defined data type, SQLColAttributes(SQL_COLUMN_TYPE_NAME) returns the name of the base data type rather than the user-defined data type.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft SQL Server ODBC Driver version 2.00.1912. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

WORKAROUND

You can determine the user-defined data type name for the column using the ODBC SQLColumns function.

Additional query words: SQLExecDirect SQLExecute odbc

Keywords: kbinterop KB143227