xHarbour Reference Documentation > Function Reference |
Moves the record pointer in a work area.
DbSkip( [<nRecords>] ) --> NIL
The return value is always NIL.
This function moves the record pointer by the number of <nRecords> records in the current work area, unless prefixed with an alias. Record pointer movement is relative to the current record and follows the logical order active in a work area. That is, indexes, filters and scopes define the order in which records are navigated.
The record pointer cannot be moved beyond the begin or end of file. An attempt to do so causes either Bof() or Eof() be set to .T. (true), and the record pointer remains unchanged.
Note: DbSkip(0) flushes and refreshes the internal database buffers. All changes made to the record become visible without moving the record pointer in either direction.
See also: | Bof(), DbGoBottom(), DbGoto(), DbGoTop(), DbSeek(), Eof(), GO, OrdSkipRaw(), SKIP |
Category: | Database functions |
Source: | rdd\dbcmd.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example shows a typical coding pattern for scanning a database // in a DO WHILE loop based on a condition. DbSkip() is always called // at the end of the loop, when the condition must be tested for the // next record. PROCEDURE Main() USE Customer ALIAS Cust NEW DO WHILE .NOT. EoF() ? Cust->Firstname,Cust->Lastname DbSkip() ENDDO USE RETURN
http://www.xHarbour.com