note 50897 modified in ref.com by danbrown

From: Date: Mon, 21 Dec 2009 17:08:18 +0000
Subject: note 50897 modified in ref.com by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164207@lists.php.net to get a copy of this message
NOTE: Using COM with windows XP with apache as a service - Compact a Microsoft Access Database Be careful $sourceFile and $destFile cannot be the same and $destFile must be unexistent <?php Function CompactMSAccess($sourceFile,$destFile) { $com = new COM("JRO.JetEngine"); $com->CompactDatabase("Data Source=$sourceFile", "Data Source=$destFile"); $com->Release(); $com=null; return is_file($destFile); //if $destFile exists it's a compact DB } CompactMSAccess('C:\directory\source.mdb', 'C:\directory\compact.mdb'); ?> --was-- // NOTE: Using COM with windows XP with apache as a service // - Compact a Microsoft Access Database // Be careful $sourceFile and $destFile //cannot be the same and // $destFile must be unexistent Function CompactMSAccess($sourceFile,$destFile) { $com = new COM("JRO.JetEngine"); $com->CompactDatabase("Data Source=$sourceFile", "Data Source=$destFile"); $com->Release(); $com=null; return is_file($destFile); //if $destFile exists it's a compact DB } CompactMSAccess('C:\directory\source.mdb', 'C:\directory\compact.mdb'); http://php.net/manual/en/ref.com.php

« previous php.notes (#164207) next »