![]() |
#1
|
|||
|
|||
![]()
What is the best software to rebuild my indexes in Paradox 7? Where can I find it?
Thanks since now!!! Heros |
#2
|
|||
|
|||
![]()
Download the TIPS of CodeBank
|
#3
|
|||
|
|||
![]()
{If you use the DBgrid and DBNavigator to delete records in a table
which has unique fields, you will find that the table grows relentlessly and you can't re-enter the same data without packing the table first. The following routine (tricky bits courtesy of Mike Orriss) will pack and reindex a DBase and (according to Mike) Paradox table, taking from a few seconds to a few minutes. Tested with a 650K DBaseIV file. Much quicker after the first call. Freeware. I accept no responsibility for loss or corruption of data, so MAKE BACKUPS BEFORE EXPERIMENTING. Just add the code below to the relevant sections. Call the function with your table's name, then wait while it grinds away. Returns True if the table is packed successfully.} {add to Uses} WinProcs, Classes, SysUtils, StdCtrls, Forms, Controls, DB, DBIProcs, DBITypes, DBIErrs, DBTables; {Add to declarations} function PackTable(tbl:TTable): Boolean; {Add to Implementation} function PackTable(tbl:TTable): Boolean; {Packs a DBaseIV (and Paradox?) table} var crtd: CRTblDesc; db: TDataBase; begin try Screen.Cursor := crHourglass; Result := True; with tbl do begin db := DataBase; If Active then Active := False; if not db.Connected then db.Connected := True; FillChar( crtd, SizeOf( CRTblDesc ), 0 ); StrPCopy( crtd.szTblName, TableName ); crtd.bPack := True; If DbiDoRestructure( db.Handle, 1, @crtd, nil, nil, nil, False ) <> DBIERR_NONE then Result := False; Open; end; {with} except on Exception do {any exception} Result := False; end; {try..except} Screen.Cursor := crDefault; end; {procedure} ================================================== === |
![]() |
Thread Tools | |
Display Modes | |
|
|