Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 10 Monaten
Letzter Beitrag:
vor 10 Monaten
Beteiligte Autoren:
Lee Shroder, Jose Antonio Garrido, GuenterP

MDB Compact & Repair

Startbeitrag von Lee Shroder am 17.10.2016 21:17

Hi All,

I have an application that is connected to an MDB file using native connectivity on Windev 21.

The MDB database has only a single table which is overwritten with data on a regular basis and never holds more than 500 records. It is a very simple flat record database.

The issue is over time the physical size of this database grows larger and larger 10's of MBytes. Performing a compact and repair from MS Access brings the database back down to under 1MB.

The target audience for this application may not have MS Access installed but will need the access database type for connection to third party applications, however the growing file size is a concern.

Is there a way from Windev to perform a compact and repair on an MDB file to reduce this growing size?

Thank you for your time :)

R L Solutions Ltd
Barcoding and Labelling Solutions


Re: MDB Compact & Repair

Hi Lee,

you can automatically compact & repair an Access database whenever it is closed


Automatically compact and repair a database when it closes

You can select the Compact on Close database option if you want to automatically compact and repair a database when it closes.

Note: Setting this option affects only the database that is currently open. You must set this option separately for each database that you want to automatically compact and repair.

On the File tab, click Options.

In the Access Options dialog box, click Current Database.

Under Application Options, select the Compact on Close check box.

Under WINDEV: use Exerun(..) with command line options to start a manual repair & compact.

von GuenterP - am 18.10.2016 06:26

Re: MDB Compact & Repair

Yo can also have a second blank .mdb. Then Copy the records and replace the main file when needed.

José Antonio.

von Jose Antonio Garrido - am 18.10.2016 06:50

Re: MDB Compact & Repair

Hi Guenter,

Thank you for pointing this out, I had come across this before but I assumed (probably incorrecrtly) that the compact and repair on close only worked when closing the database in Microsoft Access.

I will try this out later on today and let you know how I get on.

Thank you,


von Lee Shroder - am 18.10.2016 11:30

Re: MDB Compact & Repair

Hi José ,

Thank you for your suggestion, this is a great fallback option if I am unable to compact and repair on close.

Will update this post later with the final outcome.

Thank you very much for your guidance.


von Lee Shroder - am 18.10.2016 11:34

Re: MDB Compact & Repair

Hi All,

In conclusion the target clients for this application may not have MS Access installed on their computers and the compact on close is only relevant when opened from MS Access. Therefore I have had to go with the use of an empty database to prevent the database itself growing too large.

Thank you all for your assistance.

Kindest Regards,


von Lee Shroder - am 20.10.2016 15:38
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.