none
Arithmatic overflow exception while getting data from SQL using SqlDataAdapter.fill RRS feed

  • Question

  • I am executing one stored procedure over the SQL Server which is returning the data which i am collecting using SqlDataAdapter.fill in an dataset.
    The SQL stored procedure is executing correctly but the SqlDataAdapter.fill  is giving me exception where it says "Arithmetic overflow error converting expression to data type datetime."
    Wednesday, August 12, 2009 2:48 PM

Answers

  • I got the solution.
    Problem was with the SQL Login language setting.
    SQL Server has “Default Language” setting for each login(SQL Server login).
    In my case the OS has regional settings of English(UK) and SQL Login default language was British English.
    When I chage it to English it works.

    • Marked as answer by IncredibleU Thursday, August 13, 2009 8:44 AM
    Thursday, August 13, 2009 8:44 AM

All replies

  • Hello,IncredibleU
    plz check whether your expression to a datatime type correctly.
    does the data you are converting is a datatime format?
    Wenn ich dich hab’,gibt es nichts, was unerträglich ist.坚持不懈!http://hi.baidu.com/1987raymond
    Thursday, August 13, 2009 1:27 AM
  • My stored procedure is returning the record set correctly.
    Does this have to do something with locale?
    Thursday, August 13, 2009 4:40 AM
  • I got the solution.
    Problem was with the SQL Login language setting.
    SQL Server has “Default Language” setting for each login(SQL Server login).
    In my case the OS has regional settings of English(UK) and SQL Login default language was British English.
    When I chage it to English it works.

    • Marked as answer by IncredibleU Thursday, August 13, 2009 8:44 AM
    Thursday, August 13, 2009 8:44 AM
  • Congratulations!
    Wenn ich dich hab’,gibt es nichts, was unerträglich ist.坚持不懈!http://hi.baidu.com/1987raymond
    Thursday, August 13, 2009 8:46 AM