Database Guide

Selecting a row from a table

The examples for selecting a row from a table show two basic techniques for issuing a SELECT statement in Smalltalk:

Each example does the following:

  1. Creates an ordered collection to store the result table in
  2. Returns a connection for the database manager
  3. Opens the database against which the query is to be issued
  4. Defines or selects the query to be issued
  5. Issues the query
  6. Adds each row in the result table to the ordered collection
  7. Returns the ordered collection containing the result table rows

You can use these examples as a basis for creating your own queries and modify them as needed. These examples issue the following SELECT statements:

To use the examples that retrieve a query specification from an access set, create an access set and add the query specifications to it. Then, in the sample code, replace the access set and query specification names given with the names of your own access sets and query specifications.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]