Commit 6f0c90c6 authored by Alex Igoshin's avatar Alex Igoshin

Merged genesys2/anno-swt into master

parents a8135f51 bc2af5c8
......@@ -17,10 +17,10 @@ public class JdbcDrivers extends AbstractModelObject {
private String jdbcOdbcDownloadUrl = "";
{
jdbcDrivers.add(new JdbcDriver("MySQL", "com.mysql.jdbc.Driver", mySqlDownloadUrl, "jdbc:mysql://localhost:3306"));
jdbcDrivers.add(new JdbcDriver("MsSQL", "com.microsoft.sqlserver.jdbc.SQLServerDriver", msSqlDownloadUrl, "jdbc:microsoft:sqlserver://localhost:1433"));
jdbcDrivers.add(new JdbcDriver("PostgreSQL", "org.postgresql.Driver", postgreSqlDownloadUrl, "jdbc:postgresql://localhost:5432"));
jdbcDrivers.add(new JdbcDriver("JDBC ODBC", "sun.jdbc.odbc.JdbcOdbcDriver", jdbcOdbcDownloadUrl, "jdbc:odbc:"));
jdbcDrivers.add(new JdbcDriver("MySQL", "com.mysql.jdbc.Driver", mySqlDownloadUrl, "jdbc:mysql://localhost:3306/DATABASE"));
jdbcDrivers.add(new JdbcDriver("MsSQL", "com.microsoft.sqlserver.jdbc.SQLServerDriver", msSqlDownloadUrl, "jdbc:microsoft:sqlserver://localhost:1433/DATABASE"));
jdbcDrivers.add(new JdbcDriver("PostgreSQL", "org.postgresql.Driver", postgreSqlDownloadUrl, "jdbc:postgresql://localhost:5432/DATABASE"));
jdbcDrivers.add(new JdbcDriver("JDBC ODBC", "sun.jdbc.odbc.JdbcOdbcDriver", jdbcOdbcDownloadUrl, "jdbc:odbc://JDBC-ODBC-CONNECTSTRING"));
}
......
......@@ -38,13 +38,13 @@ public class JDBCRowReader {
int columnCount = metaData.getColumnCount();
ArrayList<String> columns = new ArrayList<String>();
for (int i = 1; i <= columnCount; i++) {
columns.add(metaData.getColumnName(i));
columns.add(metaData.getColumnLabel(i));
}
rows.add(columns.toArray());
while (res.next()) {
List<Object> row = new ArrayList<Object>();
for (String columnName : columns) {
Object val = res.getObject(columnName);
for (int i = 1; i <= columnCount; i++) {
Object val = res.getObject(i);
row.add(val);
}
rows.add(row.toArray());
......
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