Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


How to rebuild Indexes in database file

Posted on 1999-06-25
Medium Priority
Last Modified: 2010-04-06
How can i :
1. Rebuild Indexes
2. Saved or fixed corrupt database file
3. Make backup on a database file
can you give me a source code for it or a free component
to do that one.
Question by:mvalez
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
LVL 27

Expert Comment

ID: 1384507
for which database (paradox,access,sql)?

Author Comment

ID: 1384508
in Paradox...


Author Comment

ID: 1384509
in Paradox...

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 1384510
in Paradox...

LVL 27

Accepted Solution

kretzschmar earned 100 total points
ID: 1384511
hi again,

well i will point you first to

there is all what you need for repairing

for backup two methods

     //Copy with wildcards Help-Function
     Function CopyFiles(Source, DestPath : String; OverwriteExisting : Boolean) :
       SRec : TSearchRec;
       OK : Integer;
       OK := 0;
       If FindFirst(Source,faAnyFile,Srec) = 0 Then
         if not copyFile(PChar(ExtractFilePath(Source)+SRec.Name),PChar(DestPath
     + SRec.Name),OverwriteExisting) then
           ok := GetLastError;
       until (Findnext(SRec) <> 0) or (OK <> 0);
       Result := OK;

     procedure TForm1.Button1Click(Sender: TObject);
       if CopyFiles('C:\hadaten\contact.*','C:\tmp\',true) = 0 then
         Showmessage('Copy failed');
     //  Table1.DatabaseName := 'C:\tmp';
     //  Table1.Open;

     //With VCL-Methods
     procedure TForm1.Button2Click(Sender: TObject);
       Table2.DatabaseName := 'c:\Tmp';
       Table1.IndexDefs.Update;  //Retrieve IndexInformation
       Table2.TableName := Table1.TableName;
       Table2.CreateTable;  //create table with indexes
       Table2.BatchMove(Table1,BatAppend);  //append all to the new empty table
     //  Table2.Open;
     //  Datasource1.DataSet := Table2;


Author Comment

ID: 1384512
in Paradox...

LVL 27

Expert Comment

ID: 1384513
yup, in paradox ;-)

Author Comment

ID: 1384514
Can you give me a complete program code for it?


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

671 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question