IDatabaseCompact Interface

Provides access to members for compacting a file or personal geodatabase.

Members

Name Description
Method CanCompact True if this dataset can be compacted.
Method Compact Compacts the database.

IDatabaseCompact.CanCompact Method

True if this dataset can be compacted.

Public Function CanCompact ( _
) As Boolean
public bool CanCompact (
);

IDatabaseCompact.Compact Method

Compacts the database.

Public Sub Compact ( _
)
public void Compact (
);

Classes that implement IDatabaseCompact

Classes Description
Workspace Workspace Object.
WorkspaceName Esri Workspace Name object.

Remarks

IDatabaseCompactis an optional interface supported by File and Personal geodatabases (Access Workspaces) which allows compaction of an Access database using the services of the Jet Engine or File geodatabases. After using a Personal or File geodatabase, the database may become fragmented on disk. The Compact method rearranges how a fragmented personal geodatabase is stored on disk or rearranges the files contained within a File Geodatabase workspace. Compacting a Personal or File geodatabase often reduces its size and improves its performance.

Using the IDatabaseCompact interface requires you to open a connection to the workspace. The Compact method on ILocalDatabaseCompact takes a WorkspaceName object as an argument, so it isn't necessary to open the workspace before compacting it.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.