diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2014-12-01 02:12:32 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2014-12-01 02:12:32 +0000 |
commit | 2e461c270a6a51603f095ed33d12dcf6ee6558b1 (patch) | |
tree | 22488d9f4c591ea17135dcc70e7d268a790e9adb | |
parent | bae32bb3b12b3857b7e7f2c8e8df7bc247eddb64 (diff) | |
download | jackcess-2e461c270a6a51603f095ed33d12dcf6ee6558b1.tar.gz jackcess-2e461c270a6a51603f095ed33d12dcf6ee6558b1.zip |
Fix table name quoting for append and make table queries. fixes patch #17
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@900 f203690c-595d-4dc9-a70b-905162fa7fd2
4 files changed, 8 insertions, 2 deletions
@@ -245,6 +245,7 @@ <configuration> <issueLinkTemplatePerSystem> <SourceForge2Features>http://sourceforge.net/p/jackcess/feature-requests/%ISSUE%</SourceForge2Features> + <SourceForge2Patches>http://sourceforge.net/p/jackcess/patches/%ISSUE%</SourceForge2Patches> </issueLinkTemplatePerSystem> </configuration> <reportSets> diff --git a/src/changes/changes.xml b/src/changes/changes.xml index e745224..721e923 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -8,6 +8,9 @@ <action dev="jahlborn" type="fix" system="SourceForge2" issue="113"> Add newer sql type to access type mappings if the jvm supports them. </action> + <action dev="jahlborn" type="fix" system="SourceForge2Patches" issue="17"> + Fix table name quoting for append and make table queries. + </action> </release> <release version="2.0.7" date="2014-11-22"> <action dev="jahlborn" type="fix" system="SourceForge2" issue="111"> diff --git a/src/main/java/com/healthmarketscience/jackcess/impl/query/AppendQueryImpl.java b/src/main/java/com/healthmarketscience/jackcess/impl/query/AppendQueryImpl.java index 285ff04..a15ca5f 100644 --- a/src/main/java/com/healthmarketscience/jackcess/impl/query/AppendQueryImpl.java +++ b/src/main/java/com/healthmarketscience/jackcess/impl/query/AppendQueryImpl.java @@ -79,7 +79,8 @@ public class AppendQueryImpl extends BaseSelectQueryImpl implements AppendQuery @Override protected void toSQLString(StringBuilder builder) { - builder.append("INSERT INTO ").append(getTargetTable()); + builder.append("INSERT INTO "); + toOptionalQuotedExpr(builder, getTargetTable(), true); toRemoteDb(builder, getRemoteDbPath(), getRemoteDbType()); builder.append(NEWLINE); List<String> values = getValues(); diff --git a/src/main/java/com/healthmarketscience/jackcess/impl/query/MakeTableQueryImpl.java b/src/main/java/com/healthmarketscience/jackcess/impl/query/MakeTableQueryImpl.java index 00c9417..6a86267 100644 --- a/src/main/java/com/healthmarketscience/jackcess/impl/query/MakeTableQueryImpl.java +++ b/src/main/java/com/healthmarketscience/jackcess/impl/query/MakeTableQueryImpl.java @@ -61,7 +61,8 @@ public class MakeTableQueryImpl extends BaseSelectQueryImpl @Override protected void toSelectInto(StringBuilder builder) { - builder.append(" INTO ").append(getTargetTable()); + builder.append(" INTO "); + toOptionalQuotedExpr(builder, getTargetTable(), true); toRemoteDb(builder, getRemoteDbPath(), getRemoteDbType()); } |