Merge pull request #14 from nyalldawson/char_len

Correctly return len of character data when SQLColAttributes is called with SQL_COLUMN_TYPE_NAME
This commit is contained in:
Evan Miller
2020-08-12 22:46:52 -04:00
committed by GitHub

View File

@@ -839,7 +839,7 @@ SQLRETURN SQL_API SQLColAttributes(
{
const char *type_name = _odbc_get_client_type_name(col);
if (type_name)
snprintf(rgbDesc, cbDescMax, "%s", type_name);
*pcbDesc = snprintf(rgbDesc, cbDescMax, "%s", type_name);
break;
}
case SQL_COLUMN_LENGTH: