// -- Execute Statement
rs = ps.executeQuery();
// -- Print out Result
Receiver out = context.getReceiver();
String result = "";
int icol = rs.getMetaData().getColumnCount();
while (rs.next()) { // next row
//System.out.print("<- SQL : "+ rowStart);
out.startElement(rowCode, StandardNames.XS_UNTYPED, locationId, 0);
for (int col = 1; col <= icol; col++) { // next column
// Read result from RS only once, because
// of JDBC-Specifications
result = rs.getString(col);
out.startElement(colCode, StandardNames.XS_UNTYPED, locationId, 0);
if (result != null) {
out.characters(result, locationId, options);
}
out.endElement();
}
//System.out.println(rowEnd);
out.endElement();
}
//rs.close();
if (!connection.getAutoCommit()) {
connection.commit();