Promotic

CompactDatabase - method of the PmaDatabase object

Description:
It defragments all database tables and creates a new defragmented database on the disk. The method works only with the Access database.
Syntax:
Boolean CompactDatabase(String sDstDb, Long nLocale, String sPassword, Long nOptions)
Parameters:
sDstDb(String) Name of the destination defragmented database. It must differentiate from the database defined in the PmaDatabase object.
nLocale(Long) Language of the new created sDstDb database
sPassword(String) Password for an access to the database
nOptions(Long) is not used. Set to 0.
Note:
If new records are added and removed when working with the table of the Access database, then it can occur to the situation when the size of the used space on the disk is increasing even though the number of records of the table is constant.
The PmaDatabase object must be closed before calling this methodd (e.g. by the Close method).

This method is not functional if the "Technology" configurator is set to Access through ODBC.
Example:
JavaScriptVBScriptSelect and copy to clipboard

var oDb = pMe.Pm("/Database");
oDb.Close();
oDb.CompactDatabase("C:\\defrag.mdb", 0, "", 0);
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.