Scalar functions are inherent to ODBC, and are used when you need syntax or functionality that cannot be driver-specific. ODBC provides a large number of scalar functions for operations such as string conversion, date and time operations, mathematical functions, and so on.
In this circumstance, the error is generated when you use the ODBC scalar syntax to insert a timestamp that contains a fractional (millisecond) value. For example:
Insert into Table1 values (10, {ts '1999-09-02 12:12:12.121000'})
If you use the
SQLBindParameter function instead of the scalar syntax, the statement succeeds, and returns SQL_SUCCESS_WITH_INFO and a fractional truncation message.