diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2007-06-05 02:21:55 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2007-06-05 02:21:55 +0000 |
commit | b0bc33f822e48f5973fd9f41cc123343ff5a8d02 (patch) | |
tree | 9c3c94186c47fbf230fb8d82734614fed6dae7e2 /src/java/com | |
parent | 5de2b053b8768c9a34aa2447a2b1d62ba0102f08 (diff) | |
download | jackcess-b0bc33f822e48f5973fd9f41cc123343ff5a8d02.tar.gz jackcess-b0bc33f822e48f5973fd9f41cc123343ff5a8d02.zip |
handle reading/writing numeric values which thing that they are fixed length fields (fix #1672071)
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@148 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src/java/com')
-rw-r--r-- | src/java/com/healthmarketscience/jackcess/Column.java | 5 | ||||
-rw-r--r-- | src/java/com/healthmarketscience/jackcess/DataType.java | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/java/com/healthmarketscience/jackcess/Column.java b/src/java/com/healthmarketscience/jackcess/Column.java index 033e933..b9dc208 100644 --- a/src/java/com/healthmarketscience/jackcess/Column.java +++ b/src/java/com/healthmarketscience/jackcess/Column.java @@ -924,6 +924,11 @@ public class Column implements Comparable<Column> { case GUID: writeGUIDValue(buffer, obj); break; + case NUMERIC: + // yes, that's right, occasionally numeric values are written as fixed + // length... + writeNumericValue(buffer, obj); + break; default: throw new IOException("Unsupported data type: " + getType()); } diff --git a/src/java/com/healthmarketscience/jackcess/DataType.java b/src/java/com/healthmarketscience/jackcess/DataType.java index a19f374..eac9bd8 100644 --- a/src/java/com/healthmarketscience/jackcess/DataType.java +++ b/src/java/com/healthmarketscience/jackcess/DataType.java @@ -58,7 +58,7 @@ public enum DataType { UNKNOWN_0D((byte) 0x0D), GUID((byte) 0x0F, null, 16), // for some reason numeric is "var len" even though it has a fixed size... - NUMERIC((byte) 0x10, Types.NUMERIC, null, true, false, 17, 17, 17, + NUMERIC((byte) 0x10, Types.NUMERIC, 17, true, false, 17, 17, 17, true, 0, 0, 28, 1, 18, 28, 1); /** Map of SQL types to Access data types */ |