My Oracle Support Banner

ODBC Driver Returns Wrong Buffer_length Through SQLColumns() API (Doc ID 1290375.1)

Last updated on FEBRUARY 22, 2019

Applies to:

Oracle ODBC Driver - Version and later
Information in this document applies to any platform.


SQLColumns return wrong COLUMN_SIZE for a NVARCHAR2/NCHAR column from a SYNONYM
and wrong BUFFER_LENGTH FOR all CHAR type columns, when using char semantics but
not for NVARCHAR2 column from a SYNONYM.

From the ODBC documentation:

COLUMN_SIZE : this column contains the maximum length in characters of the column
BUFFER_LENGTH : should return the number of bytes (like OCI_ATTR_DATA_SIZE)

When specifying VARCHAR2(100 CHAR) on a AL32UTF8 RDBMS, BUFFER_LENGTH is
reported as 100 on the base table which is wrong, and the synonym report the
correct 400 bytes.




To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.