Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Arithmetic overflow error

  1. #1
    DotNetDevelopments is offline Senior Member
    Join Date
    Jul 2008
    Location
    Harlow / Essex / UK
    Posts
    619

    Exclamation Arithmetic overflow error

    I have been pulling my hair out regarding the editcoupon.aspx in the admin
    The error when attempting to save is
    C#/VB.NET Code:
    Arithmetic overflow error converting expression to data type datetime.
    The statement has been terminated
    The line is 254 but that is the execute command.
    The real issue seems to be line 235
    C#/VB.NET Code:
    sql.Append("ExpirationDate=" DB.SQuote(Localization.ConvertLocaleDateTime(CommonLogic.Left(txtDate.Text100), Localization.GetWebConfigLocale(), Localization.GetSqlServerLocale())) + ","); 
    I know our database dates have changed from UK to US in our SQL upgrade. How can I get around this?
    =====
    Version (Code/DB): AspDotNetStorefront MSx 9.1.0.1/9.1.0.0
    Execution Mode: 64 Bit
    Dot Net Developments - E-commerce By Experience

  2. #2
    suedeapple is offline Member
    Join Date
    Aug 2010
    Posts
    30

    Default

    Yeah I spotted this bug too when I changed the locale from US datetime to UK

    This seemed to fix it...

    C#/VB.NET Code:
    sql.Append("ExpirationDate=" DB.DateQuote(Localization.ToDBDateTimeString(Localization.ParseNativeDateTime(txtDate.Text))) + ","); 

  3. #3
    DotNetDevelopments is offline Senior Member
    Join Date
    Jul 2008
    Location
    Harlow / Essex / UK
    Posts
    619

    Default

    Fixed, perfect thanks.
    =====
    Version (Code/DB): AspDotNetStorefront MSx 9.1.0.1/9.1.0.0
    Execution Mode: 64 Bit
    Dot Net Developments - E-commerce By Experience