Commit 9d6d90e5 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

1) Fix errors in DB2 scripts. JM-957

2) Update jdbc class to use. JM-957
3) Ignore last ; of each statement just like we do for Oracle. JM-957

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@7015 b35dd754-fafc-0310-a699-88a17e54d16e
parent d6b525e1
...@@ -323,9 +323,9 @@ public class SchemaManager { ...@@ -323,9 +323,9 @@ public class SchemaManager {
} }
// Send command to database. // Send command to database.
if (!done && !command.toString().equals("")) { if (!done && !command.toString().equals("")) {
// Remove last semicolon when using Oracle to prevent "invalid character error" // Remove last semicolon when using Oracle or DB2 to prevent "invalid character error"
if (DbConnectionManager.getDatabaseType() == DbConnectionManager.DatabaseType if (DbConnectionManager.getDatabaseType() == DbConnectionManager.DatabaseType.oracle ||
.oracle) { DbConnectionManager.getDatabaseType() == DbConnectionManager.DatabaseType.db2) {
command.deleteCharAt(command.length() - 1); command.deleteCharAt(command.length() - 1);
} }
Statement stmt = con.createStatement(); Statement stmt = con.createStatement();
......
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
presets.add(new String[]{"Oracle","oracle.jdbc.driver.OracleDriver","jdbc:oracle:thin:@[host-name]:1521:[SID]"}); presets.add(new String[]{"Oracle","oracle.jdbc.driver.OracleDriver","jdbc:oracle:thin:@[host-name]:1521:[SID]"});
presets.add(new String[]{"Microsoft SQLServer","net.sourceforge.jtds.jdbc.Driver","jdbc:jtds:sqlserver://[host-name]/[database-name];appName=jive"}); presets.add(new String[]{"Microsoft SQLServer","net.sourceforge.jtds.jdbc.Driver","jdbc:jtds:sqlserver://[host-name]/[database-name];appName=jive"});
presets.add(new String[]{"PostgreSQL","org.postgresql.Driver","jdbc:postgresql://[host-name]:5432/[database-name]"}); presets.add(new String[]{"PostgreSQL","org.postgresql.Driver","jdbc:postgresql://[host-name]:5432/[database-name]"});
presets.add(new String[]{"IBM DB2","COM.ibm.db2.jdbc.app.DB2Driver","jdbc:db2:[database-name]"}); presets.add(new String[]{"IBM DB2","com.ibm.db2.jcc.DB2Driver","jdbc:db2://[host]:50000/[database-name]"});
%> %>
<script language="JavaScript" type="text/javascript"> <script language="JavaScript" type="text/javascript">
var data = new Array(); var data = new Array();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment