Hi,

At the moment we get a lot of (arithmetic) overflow exception. I think it is related to the fact that in the DB all decimals are declared as 'decimal(38, 19)'.

Others have reported these exceptions here:

http://support.x-tensive.com/question/2989/decimal-overflow
http://support.x-tensive.com/question/4944/decimal-overflowexception
http://support.x-tensive.com/question/5553/systemoverflowexception-conversion-overflows

I've tried using the [Field(Scale = 2)] to solve this but after a build with 'Perform' no warnings/errors came and the DB was not adjusted.

Two things:
1. Is this a bug in DO?
2. Can I safely change the 'scale' in the DB for the fields that have the above mentioned attribute (Scale = 2)?

Regards Paul

asked Apr 23 '14 at 04:40

Paul%20Sinnema's gravatar image

Paul Sinnema
261878896

edited Apr 23 '14 at 04:43

Just discovered that manually changing the decimal to decimal(38,2) in the DB is reverted on the next build with 'PerformSafely' to decimal (38, 19). I then have my old problem back again (arithmetic overflow exception)

(Apr 23 '14 at 05:13) Paul Sinnema Paul%20Sinnema's gravatar image

One Answer:

Hello Paul,

setting just Scale will not have any effect. You should specify both Scale and Precision in the [Field] attribute.

Problems with decimal overflow when reading values from the database should be solved since DataObjects.Net 4.6.4. If you still experience those please provide additional information.

answered Apr 24 '14 at 06:09

Denis%20Krjuchkov's gravatar image

Denis Krjuchkov
179325

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×7
×1
×1

Asked: Apr 23 '14 at 04:40

Seen: 2,297 times

Last updated: Nov 28 '14 at 05:27

powered by OSQA