C5_DBREINDEX

 DBREINDEX()
 Recreate all active indexes for the current work area
------------------------------------------------------------------------------
 Syntax

     DBREINDEX() --> NIL

 Returns

     DBREINDEX() always returns NIL.

 Description

     DBREINDEX() rebuilds all active indexes associated with the current work
     area.  After the indexes are recreated, the work area is moved to the
     first logical record in the controlling order.

     DBREINDEX() performs the same function as the standard REINDEX command.
     For more information, refer to the REINDEX command.

 Examples

     .  The following example reindexes the work area:

        cLast := "Winston"
        DBUSEAREA( .T., "DBFNTX", "Sales", "Sales", .T. )
        DBSETINDEX( "LASTNAME" )
        //
        IF ( Sales->(DBSEEK(cLast)) )
           IF RLOCK()
              DELETE FOR Sales->LastName == "Winston"
              Sales->( DBREINDEX() )
           ELSE
              ? "Unable to lock record..."
           ENDIF
        ELSE
           ? "Not found"
        ENDIF

 Files   Library is CLIPPER.LIB.

See Also: DBCLEARIND() DBCREATEIND() DBSETINDEX() DBSETORDER()



About these ads

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s