Share via


IColumnsInfo: Notes

Limitations

The ODBC Provider does not support the data type SQL_VARIANT. (For more information, see Known Limitations.) IColumnsInfo::GetColumnInfo will report the following metadata for SQL_VARIANT columns:

  • Type = DBTYPE_BYTES

  • Column size = 4294967295

  • DBCOLUMNFLAGS_ISLONG = True

  • SEARACHBLE = DB_ALL_EXCEPT_LIKE (from SQLGetTypeInfo)

Implementation Notes

  • Columns that have an ODBC SQL type of SQL_LONGVARCHAR or SQL_LONGVARBINARY are returned as type DBTYPE_BYTES or DBTYPE_STR, and the DBCOLUMNFLAG_ISLONG is set in the dwFlags element of the DBCOLUMNINFO structure. The ODBC Provider does not instantiate an object for these columns. Instead these settings signify that the bytes stored in the column can be retrieved or stored by requesting an ISequentialStream interface, through which the bytes can be read from or written to.

  • In some ODBC drivers, duplicate columns in an unprepared command cause the ODBC Provider to receive unexpected column names. If the command contains duplicate columns and the consumer prepares the command, unprepares the command, and then executes the command, these drivers do not generate column names for the duplicate columns. This causes a warning, DB_S_ERRORSOCCURRED, in IColumnsInfo::MapColumnsID.

  • The ODBC Provider does not support the following DBCOLUMNFLAGS in IColumnsInfo::GetColumnInfo:

    DBCOLUMNFLAGS_MAYDEFER

    DBCOLUMNFLAGS_WRITE

    DBCOLUMNFLAGS_CACHEDEFERRED

This topic is a part of: