1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Donation with Paypal!!!

    Go to your paypal account and send directly donation to [email protected]

    1 month - 10 $ - Standart VIP

    6 months - 20 $- Standart VIP

    1 year - 30 $- Standart VIP

    2 years - 50 $- Standart VIP

    Gold member for life - 150 $- Standart VIP

    High Vip (Standart VIP include) group please send PM or email to [email protected] for info

    After Donation please send email to [email protected]

  3. Donation Ways 2020


    Paysend
  4. Telegram
Dismiss Notice

Donation with Paypal!!!

Go to your paypal account and send directly donation to [email protected]

1 month - 10 $ - Standart VIP

6 months - 20 $- Standart VIP

1 year - 30 $- Standart VIP

2 years - 50 $- Standart VIP

Gold member for life - 150 $- Standart VIP

High Vip (Standart VIP include) group please send PM or email to [email protected] for info

After Donation please send email to [email protected]

Dismiss Notice
For open hidden message no need write thanks, thank etc. Enough is click to like button on right side of thread.

Access DataBase Notes

Discussion in 'Delphi Programming' started by saedi_mehdi, Dec 4, 2013.

  1. saedi_mehdi
    Offline

    saedi_mehdi DF Junior

    How to Compact and Repair an Access Database?
     
  2. darioosh2040
    Online

    darioosh2040 Guest

    thank you
     
  3. wahyujana
    Offline

    wahyujana DF Member

    RE:

    function TForm1.CompactMDB(const DBFile, Pwd: string): Boolean;
        var
          TempDBFile:string;
          ConStr:string;
          JE:OleVariant;
        begin
          ConStr := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;'
                                        +'Jet OLEDB:Database Password=%s;';
          TempDBFile:=ExtractFilePath(Application.ExeName)+'Temp.mdb';
          try
            JE:=CreateOleObject('JRO.JetEngine');
            JE.CompactDatabase(Format(ConStr,[DBFile,Pwd]),
                Format(ConStr,[TempDBFile,Pwd]));
             Result:=CopyFile(PChar(TempDBFile),PChar(DBFile),False);
            DeleteFile(PChar(TempDBFile));
          except
            Result:=False;
          end;
        end;

    procedure TForm1.buttonCompactClick(Sender: TObject);
    begin
    DM.Connect.Close;
    DM.Connect.Connected := False;
    CompactMDB(ExtractFilePath(Application.ExeName)+'database.mdb','');
    ShowMessage('Compact Database Berhasil..!');
    end;
     
  4. MoneerAhmed
    Online

    MoneerAhmed Guest

    thank you
     
  5. delphix
    Offline

    delphix DF Member

    txxxx
     
  6. Guille
    Offline

    Guille DF Member

    thanks
     
  7. sascha
    Online

    sascha Guest

    [font='Open Sans', Arial, Tahoma, Verdana, sans-serif]thank you[/font]
     
  8. Prof_Ho2
    Offline

    Prof_Ho2 DF Member

    Good bit of info thanks
     

Share This Page