Skip Headers

# Using a DataReadQuery

Previous

Next

You can use a `DataReadQuery` to execute a selecting SQL string that returns a `Collection` of the `DatabaseRows` representing the result set, as Example: Using a DataReadQuery shows.

Using a DataReadQuery

    DataReadQuery dataReadQuery = new DataReadQuery();
    dataReadQuery.setSQLStatement(sqlStatement);

    // queryResults is a Vector of DatabaseRow objects
    Vector queryResults = (Vector)session.executeQuery(dataReadQuery);