Posts

Showing posts from February, 2017

"Arithmetic operation resulted in an overflow" Error When Retrieving Data From Oracle In .NET

I ran into this fun little exception today when calling a stored procedure in Oracle from some .NET code. The error message was "Arithmetic operation resulted in an overflow", and from what I was able to Google, it seemed like it was caused by a difference in precision between numeric data types in .NET and Oracle, or  by the need to compile the code in 32-bit mode. But in my case, neither was the cause. When one of our DBAs suggested I try the same code using the simple "SELECT 1 FROM DUAL" query, and the exception still  occurred, I began to look for other reasons. Fortunately, it was an easy fix. The cause of the problem was actually a setting on the DevArt OracleCommand object being used in the .NET code. Here is the offending line of code: command.FetchSize =  int .MaxValue; Removing this line of code corrected the problem.

Using Webpack to Bundle CSS with Images and Fonts

One of my teams at work is currently developing in Angular 2, and we use Webpack for all of our TypeScript transpilation, module loading, and bundling. Yesterday we ran into an issue where one of the developers had made references to CSS files located in the node_modules directory of one of the 3rd party libraries we're using. This presented a problem because we don't distribute the node_modules folder as part of our build and deployment process -- we use JavaScript bundles created by Webpack. To correct the problem, I leveraged Webpack again, this time to bundle the required CSS files. The first step was to create a SASS file (.scss) which would be used as the entry point by Webpack. The reasoning behind using SASS was to allow us to do more than just reference the other stylesheets. But for the time being, it would do just that, and act as our entry point for Webpack to build its dependancy graph of our styles. Here's what the SASS file looked like at the start: @im