none
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 RRS feed

  • Question

  • Hello,

    We try to call the below stored procedure with the SQL Server Native Client 11 and also OLEDB Driver 18.

    Create PROCEDURE TestInputDate 
    -- Add the parameters for the stored procedure here
    @DateTime DATETIME
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

        -- Insert statements for procedure here
    SELECT @DateTime

    SET NOCOUNT OFF;
    END
    GO

    We are getting the below error

    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.

    Could you please provide the solution for this issue.

    Thanks,

    Kesava.

    Thursday, March 14, 2019 8:13 AM

All replies

  • The error doesnt look like T-SQL error

    Where are you getting this error? How have you set code in your application to get resultset value from stored procedure?

    My guess is it has something to do with datatype you chose in application particular its precision value for time part


    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

    Thursday, March 14, 2019 8:17 AM
  • Thanks Visakh16 for the quick response.

    Which is working fine with the older version of OLEDB driver.

    Once we enable the TLS1.2, we upgraded to OLEDB Deriver 18, then we are getting the error.

    But is bit difficult to update the precision of the each and every place.

    Can you please provide a generic solution for this case.

    Previously mentioned Stored procedure is just for a reference only which is not the actual case.

    Thanks,

    Kesava.

    Thursday, March 14, 2019 8:32 AM
  • Thanks Visakh16 for the quick response.

    Which is working fine with the older version of OLEDB driver.

    Once we enable the TLS1.2, we upgraded to OLEDB Deriver 18, then we are getting the error.

    But is bit difficult to update the precision of the each and every place.

    Can you please provide a generic solution for this case.

    Previously mentioned Stored procedure is just for a reference only which is not the actual case.

    Thanks,

    Kesava.

    Can you try adding DataTypeCompatibility=80 to connectionstring and see if fixes the issue?

    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

    Thursday, March 14, 2019 8:44 AM
  • Hi OP and @Visakh,

    We are also having the same problem with our application developed in VC++ 2008. Is the problem solved with the solution proposed?


    Sathish Guru V

    Monday, June 17, 2019 9:48 AM
  • I have same issue with C# application.  This only started to happen recently - applications do direct insert / updates, not using stored procs.  I do not have TLS 1.2 enabled (I did, but disabled as that was a potential cause).  Added DataTypeCompatibility=80 to connectionstring, still no go.
    Tuesday, June 25, 2019 3:33 PM
  • If you are using C# and get that error, you are using OleDb client. Why are you not using SqlClient?


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

    Tuesday, June 25, 2019 10:00 PM