aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2008-07-18 03:25:19 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2008-07-18 03:25:19 +0000
commit030b1109019a49e70afe8ce83e4fcbcbd3ce0733 (patch)
treeeb1849e1a13665713cc3f67d08969f943b5eda54 /src
parent9541bb51bbd8c1f457d5f0b923e41e0b06afa61a (diff)
downloadjackcess-030b1109019a49e70afe8ce83e4fcbcbd3ce0733.tar.gz
jackcess-030b1109019a49e70afe8ce83e4fcbcbd3ce0733.zip
Better column type translation for very large MEMO/OLE types in the Database.copyTable logic
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@360 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src')
-rw-r--r--src/changes/changes.xml4
-rw-r--r--src/java/com/healthmarketscience/jackcess/DataType.java6
2 files changed, 8 insertions, 2 deletions
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index e577cda..3d2dcf9 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -10,6 +10,10 @@
Reserve minimum space for memo/ole fields so that greedy inline row
usage does not cause spurious write failures for wide tables.
</action>
+ <action dev="jahlborn" type="fix" issue="2018713">
+ Better column type translation for very large MEMO/OLE types in the
+ Database.copyTable logic.
+ </action>
</release>
<release version="1.1.15" date="2008-06-27">
<action dev="jahlborn" type="fix" issue="1998225">
diff --git a/src/java/com/healthmarketscience/jackcess/DataType.java b/src/java/com/healthmarketscience/jackcess/DataType.java
index f648fde..8e08bec 100644
--- a/src/java/com/healthmarketscience/jackcess/DataType.java
+++ b/src/java/com/healthmarketscience/jackcess/DataType.java
@@ -377,9 +377,11 @@ public enum DataType {
// make sure size is reasonable
int size = lengthInUnits * rtn.getUnitSize();
if(rtn.isVariableLength() && !rtn.isValidSize(size)) {
- // try alternate type
+ // try alternate type. we always accept alternate "long value" types
+ // regardless of the given lengthInUnits
DataType altRtn = ALT_SQL_TYPES.get(sqlType);
- if((altRtn != null) && altRtn.isValidSize(size)) {
+ if((altRtn != null) &&
+ (altRtn.isLongValue() || altRtn.isValidSize(size))) {
// use alternate type
rtn = altRtn;
}