WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE with Access

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Pack an Access Database

Keywords: 	  pack an access database

I found somewhere a snippet in delphi + odbc connection to pack an access database. How to do it with winbatch?

The author admited that the 'COMPACT_DB' was not documented anywhere!!!

The database may not be compacted, for example, if it is in use by someone else.

Try this code. With OEAdministrator1 do:

begin
DataSourceType:= dsUser;
Driver:= 'Microsoft Access Driver (*.mdb)';
Attributes.Clear;
Attributes.Add('COMPACT_DB=' + filename+ ' ' + filename + ' General');
if not Modify then
ShowMessage('Not modified');
end;

Article ID:   W14924
File Created: 2001:11:08:12:41:00
Last Updated: 2001:11:08:12:41:00