Board index » delphi » Indexing (re-indexing) dbf files with BDE5

Indexing (re-indexing) dbf files with BDE5

I want to create a event where my users can, on a periodic basis) reindex all .dbf files used by our app.  We are using BDE5 using standard mdx indices.

How can I handle this reindexing in batch so that the users are hid from any of the mechanics?  Is there any documentation of this anywhere?

Thanks in advance.

Sam Jackendoff

 

Re:Indexing (re-indexing) dbf files with BDE5


Quote
>How can I handle this reindexing

To regenerate all the indexes for one dbase table you can use
dbiregenIndexes

if DbiRegenIndexes( Table1.Handle ) = DBIERR_NONE then
    ShowMessage( 'OK' )
  else
    ShowMessage( 'NOPE' );    

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Indexing (re-indexing) dbf files with BDE5


As always, THANKS A LOT!!!!  Your help and comments are always welcome!

Sam Jackendoff

Quote

>>How can I handle this reindexing

>To regenerate all the indexes for one dbase table you can use
>dbiregenIndexes

>if DbiRegenIndexes( Table1.Handle ) = DBIERR_NONE then
>    ShowMessage( 'OK' )
>  else
>    ShowMessage( 'NOPE' );    

>--
>Brian Bushay (TeamB)
>Bbus...@NMPLS.com

Re:Indexing (re-indexing) dbf files with BDE5


Collect the names of the dbf files into an invisible
StringList, run through the list each time creating a new
table and reindexing and then destroy the StringList.

Nick Spurrier (MoDESoft, UK)

Re:Indexing (re-indexing) dbf files with BDE5


On Tue, 23 Feb 1999 17:18 +0000 (GMT), n...@mode.co.uk (Nick Spurrier)
wrote:

Quote
>Collect the names of the dbf files into an invisible
>StringList, run through the list each time creating a new
>table and reindexing and then destroy the StringList.

And, of course, this gathering of the names of tables in a database can be
handled in one fell swoop by the TSession.GetTableNames method.

//////////////////////////////////////////////////////////////////////////
Steve Koterski                    "My problem lies in reconciling my gross
Technical Publications            habits with my net income."
INPRISE Corporation                             -- Errol Flynn (1909-1959)
http://www.inprise.com/delphi

Re:Indexing (re-indexing) dbf files with BDE5


Hello Brian,

Will DbiRegenIndexes really recreate ALL kinds of indexes? Foxpro's in
particular? I seem to remember this didn't work...

Quote
Brian Bushay TeamB wrote:
> >How can I handle this reindexing

> To regenerate all the indexes for one dbase table you can use
> dbiregenIndexes

> if DbiRegenIndexes( Table1.Handle ) = DBIERR_NONE then
>     ShowMessage( 'OK' )
>   else
>     ShowMessage( 'NOPE' );

> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Re:Indexing (re-indexing) dbf files with BDE5


Quote
>Will DbiRegenIndexes really recreate ALL kinds of indexes? Foxpro's in
>particular? I seem to remember this didn't work...

I don't not know about foxPro tables they seem to have may peculiarities
It should work for dbase tables.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads