From 45d9cf846be85fb94db11e17c02d8e0c085d649c Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Sat, 22 Nov 2014 15:01:30 +0000 Subject: [PATCH] make money columns report accurate scale/precision, fixes #112 git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@894 f203690c-595d-4dc9-a70b-905162fa7fd2 --- src/changes/changes.xml | 3 +++ src/main/java/com/healthmarketscience/jackcess/DataType.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 22ab6ae..bd5e3eb 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -9,6 +9,9 @@ Unicode compression support was not correct for all possibly compressed characters. + + Currency columns will now return an accurate scale and precision. + diff --git a/src/main/java/com/healthmarketscience/jackcess/DataType.java b/src/main/java/com/healthmarketscience/jackcess/DataType.java index 3abe78a..e115cdf 100644 --- a/src/main/java/com/healthmarketscience/jackcess/DataType.java +++ b/src/main/java/com/healthmarketscience/jackcess/DataType.java @@ -80,7 +80,8 @@ public enum DataType { * 0, any Object converted to a String and parsed as BigDecimal, or {@code * null}. Equivalent to SQL {@link Types#DECIMAL}. */ - MONEY((byte) 0x05, Types.DECIMAL, 8), + MONEY((byte) 0x05, Types.DECIMAL, 8, false, false, 0, 0, 0, false, 4, 4, 4, + 19, 19, 19, 1), /** * Corresponds to a java {@link Float}. Accepts any {@link Number} (using * {@link Number#floatValue}), Boolean as 1 or 0, any Object converted to a -- 2.39.5