Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.3 . Guide To CA-Clipper - <b>dbgoto()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DBGOTO()
 Position record pointer to a specific identity
------------------------------------------------------------------------------
 Syntax

     DBGOTO(<xIdentity>) --> NIL

 Arguments

     <xIdentity> is a unique value guaranteed by the structure of the
     data file to reference a specific item in a data source (database).  In
     a Xbase data structure (.dbf) <xIdentity> is the record number.  In
     other data formats, <xIdentity> is the unique primary key value.
     <xIdentity> could be an array offset or virtual memory handle if the
     data set is in memory instead of on disk.

 Returns

     DBGOTO() always returns NIL.

 Description

     DBGOTO() is a database function that positions the record pointer in the
     current work area at the specified <xIdentity>.  In an Xbase data
     structure, this identity is the record number because every record, even
     an empty record, has a record number.  In non-Xbase data structures,
     identity may be defined as something other than record number.

 Examples

     .  This example saves the current record number, searches for a
        key, and then restores the record pointer to the saved position:

        FUNCTION KeyExists( xKeyExpr )

           LOCAL nSavRecord := RECNO()      // Save the current record
                                            // pointer position
           LOCAL lFound

           SEEK xKeyExpr
           IF ( lFound := FOUND() )
           .
           .< statements >
           .
           ENDIF

           DBGOTO( nSavRecord )               // Restore the record
                                            // pointer position
           RETURN ( lFound )


See Also: BOF() DBGOBOTTOM() DBGOTOP() DBSEEK() DBSKIP()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson