names.add(rsmd.getColumnName(i));
tqrh.startQueryResult(names);
// begin at onset one
while (rs.next()) {
QueryBindingSet qbs = new QueryBindingSet();
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
// TODO need to parse these into appropriate resource values
String col = rsmd.getColumnName(i);
Object val = rs.getObject(i);
Value v = castValue(val);
qbs.addBinding(col, v);
}
tqrh.handleSolution(qbs);
}
tqrh.endQueryResult();
stmt.close();