aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2024-05-08 03:14:05 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2024-05-08 03:14:05 +0000
commit244a9196845d2d9c0e3b4db48d320abf878868e1 (patch)
tree9507dc8c17f1a79784b5106c852e1909d5415e3e
parent22bf8a8642c84fc500f5c66ef59de1f7211f93a3 (diff)
downloadjackcess-244a9196845d2d9c0e3b4db48d320abf878868e1.tar.gz
jackcess-244a9196845d2d9c0e3b4db48d320abf878868e1.zip
Account for character sizes when copying column lengths, fixes #158
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@1408 f203690c-595d-4dc9-a70b-905162fa7fd2
-rw-r--r--src/changes/changes.xml3
-rw-r--r--src/main/java/com/healthmarketscience/jackcess/ColumnBuilder.java2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 7f19bd4..775eab6 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -9,6 +9,9 @@
Make NumberFormatter locale aware, using the currently configured
LocaleContext.
</action>
+ <action dev="jahlborn" type="fix" system="SourceForge2" issue="158">
+ Account for character sizes when copying column lengths.
+ </action>
</release>
<release version="4.0.5" date="2023-01-26">
<action dev="jahlborn" type="add" system="SourceForge2Features"
diff --git a/src/main/java/com/healthmarketscience/jackcess/ColumnBuilder.java b/src/main/java/com/healthmarketscience/jackcess/ColumnBuilder.java
index 9253d06..44bb6ab 100644
--- a/src/main/java/com/healthmarketscience/jackcess/ColumnBuilder.java
+++ b/src/main/java/com/healthmarketscience/jackcess/ColumnBuilder.java
@@ -304,7 +304,7 @@ public class ColumnBuilder {
{
DataType type = template.getType();
setType(type);
- setLength(template.getLength());
+ setLengthInUnits(template.getLengthInUnits());
setAutoNumber(template.isAutoNumber());
if(type.getHasScalePrecision()) {
setScale(template.getScale());