| Online Eiffel Documentation

EiffelStudio

# Database Selection

Use the DB_SELECTION class to select data from the database. Once you have selected the data, you canaccess it with convenience using adaptative EiffelStore structures.

Note: Take a look at theDatabase/Eiffel objects Coupling if you need information about your database structure.

DB_SELECTION enables your application to get database content using SQL 'select' queries:

- You can carry out 'select' queries in an intuitive way using directly the SQL language:

      	selection: DB_SELECTION
      	...
      	create selection.make
      	selection.set_query ("select * from CONTACTS where firstname = 'John'")
      	selection.execute

  Tip: Always check the database status for errors after your 'select' query.

- You can also customize your selection usingbind variables.

See Also
Binding variables in a database query.
Coupling database objects with Eiffel objects.
Accessing selected data from the database.