File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -53,11 +53,13 @@ protected virtual void RegisterColumnTypes()
53
53
// NUMERIC and REAL are almost the same, they are binary floating point numbers. There is only a slight difference
54
54
// for values without a floating part. They will be represented as integers with numeric, but still as floating
55
55
// values with real. The side-effect of this is numeric being able of storing exactly bigger integers than real.
56
- RegisterColumnType ( DbType . Currency , "NUMERIC" ) ;
57
- RegisterColumnType ( DbType . Decimal , "NUMERIC" ) ;
56
+ // But it also creates bugs in division, when dividing two numeric happening to be integers, the result is then
57
+ // never fractional. So we use "REAL" for all.
58
+ RegisterColumnType ( DbType . Currency , "REAL" ) ;
59
+ RegisterColumnType ( DbType . Decimal , "REAL" ) ;
58
60
RegisterColumnType ( DbType . Double , "REAL" ) ;
59
61
RegisterColumnType ( DbType . Single , "REAL" ) ;
60
- RegisterColumnType ( DbType . VarNumeric , "NUMERIC " ) ;
62
+ RegisterColumnType ( DbType . VarNumeric , "REAL " ) ;
61
63
62
64
RegisterColumnType ( DbType . AnsiString , "TEXT" ) ;
63
65
RegisterColumnType ( DbType . String , "TEXT" ) ;
You can’t perform that action at this time.
0 commit comments