none
With SQL Sever 2008, unable to insert, a timestamp with time zone value, into the column of type datetimeoffset(7).

    Question

  • Hello,

    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.

    Could anybody shed some light on this.

    Thanks in advance,
    Prafulla
    Tuesday, August 18, 2009 6:04 AM

All replies

  • You can fix this issue by making changes in your connectionstring by adding the following along with DB Name, Provider name:

     DataTypeCompatibility=80;

     

    Rgds,

    Geo

    Friday, July 08, 2011 7:39 PM