Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- C/Database Toolchest Library - name: <b>inew_indexfile</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Name:       inew_indexfile

Purpose:    make index file for open database

Prototype:  int inew_index_file (Db_Obj   *db,
                                 int     blksize,
                                 int     overwrite);

Header:     isam.h

Inputs:     db          - database handle
            blksize     - block size for the new index file
            overwrite   - whether to overwrite an existing file.

Description:
        inew_index_file makes a new index file containing only a Physical
        Index for the database db.  The data file for the database is not
        alterered in any way.  Its main use is to re-create indexes for a
        database after the index file has been garbled or destroyed.  After
        you have made a new index file with this function, use imkindex to
        re-make your own indexes.

        The blksize is the block size for the new index file.  You can use
        0 or DEFAULT_BLKSIZE to get the default block size.  If you choose a
        block size that is less than the minimum block size, it is an error.

        If the overwrite flag is YES, inew_index_file makes a new
        index file even if there is an existing index file.  If the
        overwrite flag is NO, it will not overwrite an existing index
        file.

Returns:
        OK or ERROR

WARNING:
        If this routine returns an ERROR, it is probably best to exit the
        program and start over.

See Also: imkindex

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