xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

DbGoTop()

Moves the record pointer to first record.

Syntax

DbGoTop() --> NIL

Return

The return value is always NIL.

Description

The function moves the record pointer in the current or aliased work area to the first logical record. If no index or filter is set, this is the first physical record. Otherwise, it is the first record in logical order.

Info

See also:Bof(), DbGoBottom(), DbGoto(), DbSeek(), DbSkip(), Eof(), GO, INDEX, SET FILTER, SKIP
Category: Database functions
Source:rdd\dbcmd.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example demonstrates the effect of DbGoTop()

   PROCEDURE Main
      USE Customer

      DbGobottom()
      ? Recno(), LastRec()             // result: 225   225

      DbGoTop()
      ? Recno(), LastRec()             // result:   1   225

      ? Bof()                          // result: .F.
      SKIP -1
      ? Bof()                          // result: .T.

      USE
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe