My C++ application is connecting to SQL Server 2008 through OLE DB. The value to be inserted is 2008-08-14 12:54:23.12345-05:23. Please note that this is a parameterized insert.
For the value 2008-08-14 12:54:23.12345-05:23 , I am getting following error,
[Microsoft SQL Server Native Client 10.0]The fractional part of the provided time value overflows the scale of the corresponding SQL Server parameter or column. Increase bScale in DBPARAMBINDINFO or column scale to correct this error. (SQLSTATE=22007, SQLERRORCODE=0)
and, insert of 2008-08-14 12:54:23.00000-05:23 goes fine without any error.
As stated in the error I tried increasing the 'bScale' value inside DBPARAMBINDINFO but had no luck.