Runtime components : Service components : Database services : Database Table Mapping : Tasks : Retrieving records
  
Retrieving records
The TableService interface provides the method retrieveRecordsMatching, which takes a single argument: a string containing the search conditions used to build the SQL statement. This method returns a Vector with as many Hashtable instances as there are records matching the search criteria. Any of these hash tables can then be separately managed by the application by calling the unformat(Hashtable aDataHashtable, Context aContext) method on the formatter object that will automatically update the data fields in the operation context. The stage needs to be set just so.
The method retrieveRecordsMatching() automatically unformats the retrieved records in the operation context. This method takes three arguments: the search condition string, the context instance, and either the output formatter instance or the output formatter name.
Each of the above retrieval methods returns, by default, every table column for each returned record. If fewer columns are required, an additional argument is used: a Vector with elements containing the names of the columns to be retrieved. The order in which the column names are entered into the Vector is not significant.
Go up to
Tasks