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:
halw
2011-09-06 21:31:58 +00:00
parent 7c33e12800
commit f6b85b8086

View File

@@ -14,11 +14,18 @@ Use the [[ref:/libraries/store/reference/db_selection_flatshort|DB_SELECTION]]
... ...
create selection.make create selection.make
selection.set_query ("select * from CONTACTS where firstname = 'John'") selection.set_query ("select * from CONTACTS where firstname = 'John'") -- Set query text
selection.execute_query selection.execute_query -- Execute query
... -- Process query results
selection.terminate -- Clear database cursor
</code> </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]] . * You can also customize your selection using [[Query variables|bind variables]] .