mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 07:12:25 +01:00
Added {DB_SELECTION}.terminate to example code
Author:halw Date:2011-09-06T21:31:58.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@971 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -14,11 +14,18 @@ Use the [[ref:/libraries/store/reference/db_selection_flatshort|DB_SELECTION]]
|
||||
...
|
||||
|
||||
create selection.make
|
||||
selection.set_query ("select * from CONTACTS where firstname = 'John'")
|
||||
selection.execute_query
|
||||
selection.set_query ("select * from CONTACTS where firstname = 'John'") -- Set query text
|
||||
selection.execute_query -- Execute query
|
||||
|
||||
... -- Process query results
|
||||
|
||||
selection.terminate -- Clear database cursor
|
||||
|
||||
</code>
|
||||
|
||||
{{tip|Always check the database status for errors after your 'select' query. }}
|
||||
{{tip|<br/>
|
||||
1) Always check the database status for errors after your 'select' query.<br/>
|
||||
2) EiffelStore supports a finite number of concurrent queries. Call <code>{DB_SELECTION}.terminate</code> to free resources from a completed query. }}
|
||||
|
||||
* You can also customize your selection using [[Query variables|bind variables]] .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user