Contents Index Fetching BLOB data Inserting updating, and deleting rows

UltraLite for MobileVB User's Guide
  Understanding UltraLite for MobileVB Development
    Accessing data using the table-based API

Searching for rows with Find and Lookup


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:

Both sets are used in a similar manner:

  1. Enter Find or Lookup mode.

    The mode is entered by calling the FindBegin or LookupBegin method, respectively. For example.

    TCustomer.FindBegin
  2. 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"
  3. 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.


Contents Index Fetching BLOB data Inserting updating, and deleting rows