microsoft / ODBC-Specification

Microsoft ODBC Specification
Other
121 stars 40 forks source link

Is SQL_UDT returned for user defined distinct types or just structural types #47

Open mikepizzo opened 7 years ago

mikepizzo commented 7 years ago

Today we assume that a SQL_UDT is a structural type. Distinct user defined types are returned as their underlying primitive type, and the name is used to distinguish multiple types with the same underlying primitive type.

For example, if I created the user defined type "Shoe Size" as an integer with a max value, the SQL_TYPE in ODBC today would be SQL_INTEGER. In ODBC 4.0, would it still be SQL_INTEGER, or would it be SQL_UDT?

For consistency and simplicity it would be nice to keep it SQL_INTEGER, but is that consistent with ANSI, or would return a "ShoeSize" column as a "SQL_UDT" with a USER_DEFINED_TYPE_CODE (1045) value of “DISTINCT” (1) ( rather than “STRUCTURED” (2)).

mikepizzo commented 6 years ago

Propose: Keep consistency with ODBC 3.x and return user defined distinct types as the underlying type.