UltraLite for MobileVB User's Guide
Understanding UltraLite for MobileVB Development
Accessing data using the table-based API
UltraLite has several modes of operation when working with data. The ULTable object has two sets of methods for locating particular rows in a table:
Find methods These move to the first row that exactly matches a specified search value, under the index specified when the ULTable object was opened. If the search method cannot be found you are positioned before the first or after the last row.
Lookup methods These move to the first row that matches or is greater than a specified search value, under the index specified when the ULTable object was opened.
Both sets are used in a similar manner:
Enter Find or Lookup mode.
The mode is entered by calling the FindBegin or LookupBegin method, respectively. For example.
TCustomer.FindBegin
Set the search values.
You do this by setting values in the current row. Only values in the columns of the index are relevant to the search.
Setting these values affects the buffer holding the current row only, and does not affect the database. For example:
TCustomer.Column( "lname" ).StringValue = "Kaminski"
Search for the row.
Use the appropriate method to carry out the search. For example, the following instruction looks for the first row that exactly matches the specified value in the current index:
TCustomer.FindFirst
For multi-column indexes, a value for the first column is always used, but you can omit the other columns and you can specify the number of columns as a parameter to FindFirst.
For a list of methods, see Table.