dbGoto()

DBGOTO()

Position the record pointer to a specific location.

Syntax

      DBGOTO(<xRecordNumber>)

Arguments

<xRecordNumber> Record number or unique identity

Description

This function places the record pointer, if working with a .dbf file, in selected or aliased work area at the record number specified by <xRecordNumber>. The position is not affected by an active index or by any enviromental SET condiction.

The parameter <xRecordNumber> may be something other than a record number. In some data formats, for example, the value of <xRecordNumber> is a unique primary key while in other formats, <xRecordNumber> could be an array offset if the data set was an array.

Issuing a DBGOTO(RECNO()) call in a network enviroment will refresh the database and index buffers. This is the same as a DBSKIP(0) call.

Examples

      The following example uses DBGOTO() to iteratively process
      every fourth record:

      DBUSEAREA( .T., "DBFNTX", "sales", "sales", .T. )
      //
      // toggle every fourth record
      DO WHILE ! EOF()
         DBGOTO( RECNO() + 4 )
         sales->Group := "Bear"
      ENDDO

Compliance

Clipper

Files

Library is rdd

Seealso

BOF(), EOF(), DBGOTOP(), DBGOBOTTOM(), DBSEEK(), DBSKIP()

3 responses to “dbGoto()

  1. Pingback: Harbour All Functions – D | Viva Clipper !

  2. Pingback: Harbour Database Functions | Viva Clipper !

  3. Pingback: Harbour RG Summary | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.