com.esri.arcgis.geodatabase
Interface IScratchWorkspaceFactory

All Superinterfaces:
Serializable
All Known Subinterfaces:
IScratchWorkspaceFactory2
All Known Implementing Classes:
FileGDBScratchWorkspaceFactory, ScratchWorkspaceFactory

public interface IScratchWorkspaceFactory
extends Serializable

Provides access to members that create or get a scratch workspace.

Superseded By

IScratchWorkspaceFactory2

Description

IScratchWorkspaceFactory is used to create temporary personal geodatabases in the temp directory. You can find this directory by looking at the %TEMP% environment variable. The scratch personal geodatabase will have the name mx<number>.mdb where <number> is the lowest positive number that uniquely identifies the geodatabase.

ScratchWorkspaces are most commonly used for passing in to ITable.Select or IFeatureClass.Select, but can be used anytime a personal geodatabase is required and you want it to automatically be deleted when it's no longer referenced.

The first time IScratchWorkspaceFactory.DefaultScratchWorkspace is called, it will create a new temporary workspace and pass it back. Subsequent calls to this method will return the same workspace. When the application is closed, the default scratch workspace will be deleted.

Workspaces created by IScratchWorkspaceFactory.CreateNewScratchWorkspace will be automatically deleted when the last reference to them is released.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux


Method Summary
 IWorkspace createNewScratchWorkspace()
          Creates and returns a new scratch workspace.
 IWorkspace getDefaultScratchWorkspace()
          The default scratch workspace.
 

Method Detail

getDefaultScratchWorkspace

IWorkspace getDefaultScratchWorkspace()
                                      throws IOException,
                                             AutomationException
The default scratch workspace.

Remarks

IScratchWorkspaceFactory is used to create temporary personal geodatabases in the temp directory. You can find this directory by looking at the %TEMP% environment variable. The scratch personal geodatabase will have the name mx<number>.mdb where <number> is the global unique identifier that uniquely identifies the geodatabase.

The first time IScratchWorkspaceFactory.DefaultScratchWorkspace is called, it will create a new temporary workspace and pass it back. Subsequent calls to this method will return the same workspace. When the application is closed, the default scratch workspace will be deleted.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.geodatabase.IWorkspace
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createNewScratchWorkspace

IWorkspace createNewScratchWorkspace()
                                     throws IOException,
                                            AutomationException
Creates and returns a new scratch workspace.

Remarks

IScratchWorkspaceFactory is used to create temporary personal geodatabases in the temp directory. You can find this directory by looking at the %TEMP% environment variable. The scratch personal geodatabase will have the name mx<number>.mdb where <number> is the global unique identifier that uniquely identifies the geodatabase.

Workspaces created by IScratchWorkspaceFactory.CreateNewScratchWorkspace will be automatically deleted when the last reference to them is released.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.geodatabase.IWorkspace
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.