INVBUFLEN

The string or buffer length specified is invalid. Negative values such as SQL_NTS have special meaning, but not all negative values are valid.

Resolution:

Check the ODBC documentation for valid length specifiers.