This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/master by this push:
new 9785c30ccf MS Access output transform doesn't set the text field
length right #2867
new 5d9ac28eaf Merge pull request #2876 from nadment/2867
9785c30ccf is described below
commit 9785c30ccf92fe027e7fc30729fe178abee4106c
Author: Nicolas Adment <[email protected]>
AuthorDate: Thu Apr 27 20:25:27 2023 +0200
MS Access output transform doesn't set the text field length right #2867
---
.../apache/hop/pipeline/transforms/accessoutput/AccessOutput.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git
a/plugins/databases/access/src/main/java/org/apache/hop/pipeline/transforms/accessoutput/AccessOutput.java
b/plugins/databases/access/src/main/java/org/apache/hop/pipeline/transforms/accessoutput/AccessOutput.java
index 67fcf9200b..ba4ed0c8e3 100644
---
a/plugins/databases/access/src/main/java/org/apache/hop/pipeline/transforms/accessoutput/AccessOutput.java
+++
b/plugins/databases/access/src/main/java/org/apache/hop/pipeline/transforms/accessoutput/AccessOutput.java
@@ -323,13 +323,12 @@ public class AccessOutput extends
BaseTransform<AccessOutputMeta, AccessOutputDa
column.setLength(DataType.SHORT_DATE_TIME.getFixedSize());
break;
case IValueMeta.TYPE_STRING:
- if (length < 255) {
+ if (length < DataType.TEXT.getMaxSize()/DataType.TEXT.getUnitSize()
) {
column.setType(DataType.TEXT);
- column.setLength(DataType.TEXT.getUnitSize());
} else {
- column.setType(DataType.MEMO);
- column.setLength(DataType.MEMO.getUnitSize());
+ column.setType(DataType.MEMO);
}
+ column.setLength(length);
break;
case IValueMeta.TYPE_BINARY:
column.setType(DataType.BINARY);