TmsaUtility Component

A simple component that uses OLEAutomation to Repair and Compress Microsoft Access (MDB) Data Files.

From Final Filer Software
(Pierre du Parté)
http://www.finalfiler.com
mailto:finalfiler@finalfiler.com
 
Version 1.000

Top Of Page

OVERVIEW

Repairing & Compacting Access Database is actually a relatively simple matter with Delphi. Nevertheless, I though a component could make the process simpler still. This component DOES NOT use the BDE- it calls the DAO library directly through OLEAutomation.

Apart from the objective functions of repair and compact, the component will

It should be straightforward to build other DAO.Engine procedures into the component, hence it’s name ‘TmsaUtility’
If you find this component useful or have suggestions, please send me an email- pierre@finalfiler.com
Enjoy!

Original Release 28/3/1998

Top Of Page

LICENCE: Free!

CONDITIONS OF USE-

GUARANTEES, WARRANTIES ETC.

RESPONSIBILITY:

Copyright

If you respect copyright legislation, then the copyright to these components belongs to Final Filer Software (1998). Feel free to use the component as you see fit, but if you make changes, how about letting the rest of us know?

Top Of Page

 

THE COMPONENTS:

The Main Components- TmsaUtility

TmsaUtility

The component takes the explicit path and name of an .MDB file and repairs and/ or compresses it. As an aside functions to return the OLEVariant of the DAOEngine have been made public.

NOTE: Compact writes a temporary file that will be the compacted file. Hence there must be available disk space for the task. If compaction succeeds the original is deleted and the new (temporary) file is renamed to that of the original.

Repair & Compact require exclusive access.

PROPERTIES:

FLAGS:

METHODS:

Sample:

procedure TForm1.Button1Click(Sender: TObject);
begin
// repair and compact
msaUtility.Options := fmsaRepairCompact;
// set the MDBFilename

if msaUtility1.SelectMDBFile then

// if successful, execute the action

msaUtility1.execute;

end;

USING THE COMPONENT:

1- Drop the component on a form.
2- Set the MDBFilename to the path and name of the MDB file to repair/ compact.
3- Select the Option that will determine the action.
4- Call Execute!

NOTES:

If you DO NOT specify a MDBFilename, SelectMDBFile is called automatically.

Top Of Page

 

INSTALLATION:

The Component:

In Delphi 3 Click File|Open
Select AccessUtility.dpk
In the subsequent Dialog click Compile
Click Install

 

Top Of Page

  

 HISTORY

Version 1.00 released 28/3/1998

Top Of Page