Online Eiffel Documentation |
Documentation Home > Class Libraries > EiffelStore > EiffelStore Samples |
EiffelStudio |
Esql Sample |
This sample consists of a command line SQL parser. SQL statements are filtered through a monitor and sent to the RDBMS.
To compile the example:
This sample lets you interact with your database through a console.
First you have to enter the database connection information:
Database user authentication: Data Source Name: handson Name: smith Password: mypass
Note: Name andPassword are no required with ODBC. If you don't needName andPassword,you can simply hitReturn when prompted.
Database user authentication: Name: smith@HANDSON Password: mypass
Note: you have to specify the Oracle User Name and Net Service Name with the syntax<user>@<service> where<user> stands for the User Name and<service> stands for the Net Service Name.
Then you can enter standard SQL queries to interact with your database, for instance:
SQL> select firstname, lastname from CONTACTS where lastname = 'Smith' John Smith SQL>
Note: enterexit to quit the application.
This sample showcases the use of the 3 basic classes to interact with your database:
The whole sample code is contained in the root class:
Copyright 1993-2006 Eiffel Software. All rights reserved. |