Commit ee0f66f6 authored by Matija Obreza's avatar Matija Obreza

Fixed reading column names and data from ResultSet

parent a8135f51
......@@ -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