to douh:
简单地FILECOPY并不好,一是.mdb的文件相当大,二是不灵活,比如我只想备份12月份的数据,
只想恢复8月份的数据,用FILECOPY就不行了。ado中又没有batchmove的等价用法。
还有就是要压缩access数据库文件:OLE DB Provider for Microsoft Jet中有一个interface:
IJetCompact,其语法如下:不知在delphi中应当如何调用?
IJetCompact::Compact
Compacts or repairs a database, creating a new database. The old database is
retained unchanged.
Syntax
HRESULT IJetCompact::Compact(
ULONG cPropertySets,
DBPROPSET rgPropertySets[]);
Parameters
cPropertySets
[in]
The number of DBPROPSET structures in rgPropertySets. If this is zero,
the provider ignores rgPropertySets and the method does nothing.
rgPropertySets
[in/out]
An array of DBPROPSET structures containing properties and values to be set.
If the data source object or enumerator is uninitialized, the properties
specified in these structures must belong to the Initialization property group.
If the data source object is initialized, the properties must belong to the
Data Source property group. If the enumerator is initialized, it is an error
to call this method. If the same property is specified more than once in
rgPropertySets, the value used is provider-specific. If cPropertySets is zero,
this parameter is ignored.