{
Query query = QueryFactory.create(queryString) ;
SDBConnection conn = new SDBConnection(jdbcConnection) ;
Store store = StoreFactory.create(storeDesc, conn) ;
Dataset ds = DatasetStore.create(store) ;
QueryExecution qe = QueryExecutionFactory.create(query, ds) ;
try {
ResultSet rs = qe.execSelect() ;
ResultSetFormatter.out(rs) ;
} finally { qe.close() ; }
// Does not close the JDBC connection.
// Do not call : store.getConnection().close() , which does close the underlying connection.
store.close() ;
}