UltraLite for MobileVB User's Guide
Understanding UltraLite for MobileVB Development
Accessing data using the table-based API
At any time, a ULTable object is positioned at one of the following positions:
Before the first row of the table.
On a row of the table.
After the last row of the table.
If the ULTable object is positioned on a row, you can use the Column method together with a method appropriate for the data type of that column to access the value of that row. For example, the following expression represents the value of the lname column, as a character string:
TCustomer.Column( "lname" ).StringValue
The following expression represents the value of the ID column, an integer:
TCustomer.Column( "ID" ).IntegerValue
You can assign values to the properties even if you are before the first row or after the last row of the table. You cannot, however, get values from the column.
' This code is incorrect TCustomer.MoveBeforeFirst id = TCustomer.Column( "ID" ).IntegerValue
To work with binary data, use the GetBytes method instead of a property.
The method you choose on the ULColumn object must batch the Visual Basic data type you wish to assign. UltraLite automatically casts data types where they are compatible, so that you could use the StringValue method to fetch an integer value into a string variable, and so on.
For more information on accessing values of the current row, see the methods and properties of Column.