xHarbour Reference Documentation > Function Reference |
Browse a database file
Browse( [<nTop>] , ; [<nLeft>] , ; [<nBottom>], ; [<nRight>] ) --> lOk
The return value is .F. (false) if there is no database open in the work area, otherwise .T. (true) is returned.
The Browse() function displays a simple database browser in a console window. Data is taken from the database open in the current work area, unless Browse() is used in an aliased expression.
The function provides for basic database navigation and editing using the following keys:
Table navigation with Browse()
Key | Description |
---|---|
Up | Move up one row (previous record) |
Down | Move down one row (next record) |
PgUp | Move to the previous screen |
PgDn | Move to the next screen |
Left | Move one column to the left (previous field) |
Right | Move one column to the right (next field) |
Home | Move to the leftmost visible column |
End | Move to the rightmost visible column |
Ctrl+Home | Move to the leftmost column |
Ctrl+End | Move to the rightmost column |
Ctrl+Left | Pan one column to the left |
Ctrl+Right | Pan one column to the right |
Ctrl+PgUp | Move to the top of the file |
Ctrl+PgDn | Move to the end of the file |
Enter | Edit current cell |
Del | Toggles the deleted flag of current record. |
Esc | Terminate Browse() |
A status line is displayed on top of the Browse() window presenting the user the following information:
Browse() status information
Display | Description |
---|---|
Record ###/### | Current record number / Total number of records. |
<none> | There are no records, the database is empty. |
<new> | A new record is about to be added. |
<Deleted> | Current record is deleted. |
<bof> | Top-of-file is reached. |
A new record is automatically added when the user browses past the end of the database and edits a field on the new record.
See also: | DbEdit(), TBrowse(), TBrowseDB() |
Category: | Database functions , UI functions |
Source: | rtl\browse.prg |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example shows how to browse an indexed database. PROCEDURE Main USE Customer INDEX ON Upper(Lastname+Firstname) TO Cust01 Browse() CLOSE Customer RETURN
http://www.xHarbour.com