Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - reindex regenerate all indexes for a database http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 reindex             Regenerate all indexes for a database
------------------------------------------------------------------------------
 Syntax
   [!sAlias] reindex

 Arguments
   sAlias is the database to reindex.

 Description
   The reindex command causes all indexes for a database to be regenerated.

   reindex should be used when there is a possibility that the data file
   does not match the index file. This condition can exist when a database
   file has been updated separately from the index.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   proc Test_reindex
   vardef
      ulong nRecCount
   enddef
   open sTest index sIdxLN, sIdxB
   set order to 1             // order on 1st index
   count to nRecCount         // find out how many indexed records
      ? nRecCount, reccount()
   if nRecCount != reccount()
      reindex
   endif
   if day( today() ) % 2 = 0  // regenerate indexes every other day.
      ? "Reindexing..."
      reindex
   endif
   endproc

   proc main
   Test_reindex()
   endproc

See Also: index

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