UltraLite for MobileVB User's Guide
Understanding UltraLite for MobileVB Development
Accessing data using dynamic SQL
Navigating through dynamic SQL result sets
UltraLite for MobileVB provides you with a number of methods to navigate a result set. To call your method, use the following model to guide your writing: MyResultSetName.MethodName.
The following methods allow you to navigate your result set:
MoveAfterLast moves to a position after the last row.
MoveBeforeFirst moves to a position before the first row.
MoveFirst moves to the first row.
MoveLast moves to the last row.
MoveNext moves to the next row.
MovePrevious moves to the previous row.
MoveRelative moves a certain number of rows relative to the current row, as specified in the index. Relative to the current position of the cursor in the result set, positive index values move forward in the result set, negative index values move backward in the result set and zero does not move the cursor. Zero is useful if you want to repopulate a row buffer.
The following example shows you how you can use MoveFirst to navigate within a result set.
Set x = Connection.PrepareStatement( _ "SELECT ID, Name FROM customer") Set MyResultSet = x.ExecuteQuery MyResultSet.MoveFirst