I am using the following function call to retrieve the REMARKS of a column of my MS SQL server table.
But comment is always an empty string.All other columns are retrieved successfully.
Is there any setting that needs to be set in ODBC configuration?
From the codes syntax, there is no error. An ODBC 3.0 or 2.x application will always bind to the ANSI data types. For optimum performance, an ODBC 3.5 (or higher) application should bind to the ANSI data C type if the SQL column type is ANSI, and should bind to the Unicode C data type if the SQL column type is Unicode. Please check the data type of column 12 and ODBC version.
BUG: SQL Server ODBC Driver Incorrectly Maps Unicode Datatypes with SQL_C_DEFAULT
TechNet Community Support
We use the following function call the ODBC behaviour.
SQLSetEnvAttr(m_henv, SQL_ATTR_ODBC_VERSION,(SQLPOINTER)SQL_OV_ODBC3, 0);
I have even tried setting it to 3.8 using the following function call.
SQLSetEnvAttr(m_henv, SQL_ATTR_ODBC_VERSION,(SQLPOINTER)SQL_OV_ODBC3_80, 0);
But the problem still persists.