/[eiffelstudio]/trunk/Delivery/xmldoc/libraries/store/samples/10_esql/index.xml
ViewVC logotype

Contents of /trunk/Delivery/xmldoc/libraries/store/samples/10_esql/index.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 63849 - (show annotations)
Mon Sep 25 19:25:28 2006 UTC (13 years, 4 months ago) by patrickr
File MIME type: text/xml
File size: 3693 byte(s)
removed version numbers from library index page
updated sample documentations of most libraries
1 <document output="studio" title="Esql Sample">
2 <meta_data/>
3 <paragraph>
4 <paragraph> This sample consists of a command line SQL parser. SQL statements are filtered through a monitor and sent to the RDBMS. </paragraph>
5 <paragraph>
6 <heading>
7 <size>2</size>Compiling
8 </heading>
9 <paragraph> To compile the example: </paragraph>
10 <list ordered="false">
11 <item>Launch EiffelStudio. </item>
12 <item>Click <bold>Add project</bold></item>
13 <item>Browse to
14 <italic>$ISE_EIFFEL\examples\store\esql\\</italic>.
15 </item>
16 <item>Choose <italic>esql.ecf</italic></item>
17 <item>Choose the location where the project will be compiled, by default the same directory containing the configuration file. </item>
18 <item>Choose the targe according to the installed DBMS.</item>
19 <item>Click
20 <bold>OK</bold>.
21 </item>
22 </list>
23 <paragraph>
24 <heading>
25 <size>2</size>Running
26 </heading>
27 <paragraph>This sample lets you interact with your database through a console. </paragraph>
28 <paragraph>First you have to enter the database connection information: </paragraph>
29 <list ordered="false">
30 <item>For ODBC:
31 <code_block>
32 Database user authentication:
33 Data Source Name: handson
34 Name: smith
35 Password: mypass
36 </code_block>
37 <note>
38 <bold>Note:</bold>
39 <italic> Name</italic> and
40 <italic>Password</italic> are no required with ODBC. If you don't need
41 <italic>Name</italic> and
42 <italic>Password</italic>,
43 <italic/>you can simply hit
44 <bold>Return</bold> when prompted
45 <italic>.</italic>
46 </note>
47 </item>
48 </list>
49 <list ordered="false">
50 <item>For Oracle:
51 <code_block>
52 Database user authentication:
53 Name: smith@HANDSON
54 Password: mypass
55 </code_block>
56 <note>
57 <bold>Note:</bold> you have to specify the Oracle User Name and Net Service Name with the syntax
58 <italic>&lt;user&gt;@&lt;service&gt; </italic>where
59 <italic>&lt;user&gt;</italic> stands for the User Name and
60 <italic>&lt;service&gt;</italic> stands for the Net Service Name.
61 </note></item>
62 </list>
63 <paragraph>Then you can enter standard SQL queries to interact with your database, for instance: </paragraph>
64 <code_block>
65 SQL> select firstname, lastname from CONTACTS where lastname = 'Smith'
66 John Smith
67 SQL>
68 </code_block>
69 <note>
70 <bold>Note:</bold> enter
71 <italic>exit</italic> to quit the application.
72 </note>
73 <heading>
74 <size>2</size>Under the Hood
75 </heading>
76 <paragraph> This sample showcases the use of the 3 basic classes to interact with your database: </paragraph>
77 <list ordered="false">
78 <item>
79 <link>
80 <url>../../reference/interface/db_control_chart.xml</url>
81 <label>DB_CONTROL</label>
82 </link> to connect and disconnect to your database.
83 </item>
84 <item>
85 <link>
86 <url>../../reference/interface/db_selection_chart.xml</url>
87 <label>DB_SELECTION</label>
88 </link> to perform 'select' queries.
89 </item>
90 <item>
91 <link>
92 <url>../../reference/interface/db_change_chart.xml</url>
93 <label>DB_CHANGE</label>
94 </link> to perform SQL queries that output no result.
95 </item>
96 </list>
97 <paragraph>The whole sample code is contained in the root class:</paragraph>
98 <list ordered="false">
99 <item>
100 <link>
101 <label>ESQL</label>
102 </link> for Oracle.
103 </item>
104 <item>
105 <link>
106 <label>ESQL_ODBC</label>
107 </link> for ODBC.
108 </item>
109 </list>
110 </paragraph>
111 </paragraph>
112 </paragraph></document>

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23