This is a migrated thread and some comments may be shown as answers.

Parameter value out of range

7 Answers 260 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
richardFlow
Top achievements
Rank 1
richardFlow asked on 25 Feb 2009, 03:06 PM
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.

7 Answers, 1 is accepted

Sort by
0
richardFlow
Top achievements
Rank 1
answered on 25 Feb 2009, 05:01 PM
For your info, the sql server fields in question are Decimal(38,20).

Thanks.
0
richardFlow
Top achievements
Rank 1
answered on 25 Feb 2009, 05:30 PM
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.
0
Jan Blessenohl
Telerik team
answered on 27 Feb 2009, 05:42 PM
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.
0
richardFlow
Top achievements
Rank 1
answered on 18 Apr 2009, 02:21 PM
Hi Jan,

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

Regards,

Richard.
0
Jan Blessenohl
Telerik team
answered on 20 Apr 2009, 04:37 PM
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.
0
richardFlow
Top achievements
Rank 1
answered on 17 Aug 2009, 09:59 AM
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.
               
0
Ady
Telerik team
answered on 18 Aug 2009, 12:17 PM
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.
Tags
General Discussions
Asked by
richardFlow
Top achievements
Rank 1
Answers by
richardFlow
Top achievements
Rank 1
Jan Blessenohl
Telerik team
Ady
Telerik team
Share this question
or