try {
//statement = connection.createStatement();
statement = connection.prepareStatement(RETRIEVE, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
statement.setInt(1, sessionID);
results = statement.executeQuery();
results.last();
headingsCount = results.getRow();
headings = new String[headingsCount];
results.beforeFirst();
while (results.next()) {
headings[results.getInt("position")] = results.getString("name");