Reputation: 63
When I tried to store the decimal x = -258.9697 to database from EntityFramework, I got exception of "ORA-16550: truncated result". The column of x in the db is NUMBER (7, 4), and it's no problem if I store x as positive decimal value 258.9697. The exception solved if I increase the scale to, like (10, 4). Anyone know the reason?
Upvotes: 4
Views: 728
Reputation: 9091
Which Oracle provider and version are you on? This sounds like Bug 28227512:
OracleDecimal.ConvertToPrecScale method of ODP managed driver throws ORA-16550 error for negative values paassed as the negative sign is considered while calculating the precision.
If I'm reading it right, it should be fixed in ODP.NET version 19.1 and later.
Upvotes: 2