Parameter value out of range

Thread is closed for posting
8 posts, 0 answers
  1. richardFlow
    richardFlow avatar
    62 posts
    Member since:
    Jun 2012

    Posted 25 Feb 2009 Link to this post

    Hi,

    On doing a simple scope.add() and get an error back as follows:

    An exception of type 'Telerik.OpenAccess.Exceptions.DataStoreException' occurred in Telerik.OpenAccess.Runtime.dll but was not handled in user code

    Additional information: Insert of '440369074-GBP--0-2000015-UNIT-LDO' failed: System.ArgumentException: Parameter value '20.00000000000000000000' is out of range.

    My code is pretty straightforward, and i've had no problems with other objects. Code as follows:

    ...
        wsps.PriceOriginal = 123;
            wsps.PriceUsed = 123 * (1 - (sld.LineDiscount / 100));
            wsps.SalesPriceType = SalesPrice.SalesPriceTypeEnum.Normal;
            wsps.LineDiscount = sld.LineDiscount;
            wsps.MaxDiscount = sld.MaxDiscount;
            wsps.Saving = wsps.PriceOriginal - wsps.PriceUsed;
            wsps.Poa = false;

            cachedScope.Transaction.Begin();
            cachedScope.Add(wsps);
            cachedScope.Transaction.Commit();

    Is it something to do with decimals and precision and scale on sql server? 

    thanks,

    Richard.
  2. richardFlow
    richardFlow avatar
    62 posts
    Member since:
    Jun 2012

    Posted 25 Feb 2009 Link to this post

    For your info, the sql server fields in question are Decimal(38,20).

    Thanks.
  3. richardFlow
    richardFlow avatar
    62 posts
    Member since:
    Jun 2012

    Posted 25 Feb 2009 Link to this post

    I CAN'T BELIEVE IT!!!! I lost an entire day over this!!  

    OpenAccess doesn't update the app.config file with the scale of decimal fields when they are changed on sql server.  Even after doing a merge of the schemas.  This is a definite bug in your system i believe.

    I've manually updated app.config on my system and it works fine. It was doing the equivalent of Decimal(9,20).

    Could you please confirm if this is a bug or not, or just me not seeing something.

    Regards.
  4. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 27 Feb 2009 Link to this post

    Hi Web Belief Ltd,
    I am sorry that you ran into such a problem. I have fixed it and gave you Telerik points for your bug report.

    The fix will be available in the Q1 release.

    Regards,
    Jan Blessenohl
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. richardFlow
    richardFlow avatar
    62 posts
    Member since:
    Jun 2012

    Posted 18 Apr 2009 Link to this post

    Hi Jan,

    I just ran into this problem again... did it get fixed in the last release?

    Regards,

    Richard.
  6. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 20 Apr 2009 Link to this post

    Hi Web Belief Ltd,
    All fixes are part of the last patch Q1 SP1. Can you verify the version you are using and describe the problem a bit more?

    Regards,
    Jan Blessenohl
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. richardFlow
    richardFlow avatar
    62 posts
    Member since:
    Jun 2012

    Posted 17 Aug 2009 Link to this post

    Hi,

    I think there are still issues with this.  the schema merge does not update my app.config with fields like:

     <extension key="db-scale" value="2" />

    It doesn't put them in at all. I have to manually add them or else i get errors of the form:

    Parameter value '122.55000000' is out of range.

    Regards,

    Richard.
                   
  8. Ady
    Admin
    Ady avatar
    589 posts

    Posted 18 Aug 2009 Link to this post

    Hi Web Belief Ltd,

      I did try to reproduce the problem you mentioned but could not. The 'Merge' mechanism detected a change in the scale and merged the change accordingly. Also the app.config was appropriately updated.

    Can you provide some more information/steps in order to reproduce the problem?

    All the best,
    Ady
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top