Click or drag to resize

DbGoBottom Function (Usual)

Move to the last logical record.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.4a
Syntax
 FUNCTION DbGoBottom(
	uArea AS USUAL
) AS LOGIC
View Source

Parameters

uArea
Type: Usual
Specifies the work area name or number for a table on which the operation must be performed.

Return Value

Type: Boolean
TRUE if successful; otherwise, FALSE.
Remarks
By default, this function operates on the currently selected work area.   It can be made to operate on an unselected work area by specifying it within an aliased expression or by calling the that accepts a workarea parameter (a workarea number or alias ). DBGoBottom() is the functional equivalent of the GO BOTTOM command.
For more information, refer to the GO command.
Tip Tip
Logical records: DBGoBottom() operates on logical records.
If the work area has an active order list, DBGoBottom() moves to the last record in controlling order.
If a filter is set, only records which meet the filter condition are considered. Shared mode: For a shared file, moving to a different record can cause updates to the current record to become visible to other processes.  
Examples
The following example uses DBGoBottom() to position the record pointer on the last logical record:
X#
 1DBUseArea(TRUE, "DBFNTX", "sales", "Sales", TRUE)
 2Sales->DBSetIndex("lastname")
 3Sales->DBGoBottom()
 4IF Sales->Last == "Winston"
 5    IF Sales->RLock()
 6        Sales->DBDelete()
 7        QOut("Record deleted: ", Sales->Deleted())
 8    ELSE
 9        QOut("Unable to lock record...")
10    ENDIF
11END
See Also