ArcObjects Library Reference (GeoDatabase)  

IWorkspace Interface

Provides access to members that have information about the workspace.

Product Availability

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

Members

Description
Read-only property ConnectionProperties The connection properties of the workspace.
Read-only property DatasetNames The DatasetNames in the workspace.
Read-only property Datasets The datasets in the workspace.
Method ExecuteSQL Executes the specified SQL statement.
Method Exists Checks if the workspace exists.
Method IsDirectory TRUE if the workspace is a file system directory.
Read-only property PathName The file system full path of the workspace.
Read-only property Type The Type of the Workspace.
Read-only property WorkspaceFactory The factory that created the workspace.

CoClasses that implement IWorkspace

CoClasses and Classes Description
AMSWorkspace (esriTrackingAnalyst) Controls the Tracking Server workspace COM object's properties.
NetCDFWorkspace (esriDataSourcesNetCDF) The NetCDF workspace object.
RasterWorkspace (esriDataSourcesRaster) The raster workspace object.
Sde3Workspace (esriDataSourcesGDB) ESRI SDE (3.x) Feature Database.
Sde4Workspace (esriDataSourcesGDB) ESRI SDE (4.x) Feature Database.
SqlWorkspace (esriDataSourcesGDB) Sql workspace
VersionedWorkspace VersionedWorkspace Object.
Workspace Workspace Object.

Remarks

A Workspace is a container of spatial and non-spatial datasets such as feature classes, raster datasets and tables. It provides methods to instantiate existing datasets and to create new datasets. Workspaces are classified into types specified by the esriWorkspaceType enumerator; FileSystemWorkspace, LocalDatabaseWorkspace, and RemoteDatabaseWorkspace. Shapefiles and ArcInfo workspaces are examples of FileSystemWorkspace. A personal geodatabase stored in Access or a File Geodatabase is an example of a LocalDatabaseWorkspace.  A geodatabase stored in an RDBMS such as Oracle, DB2, SqlServer, or Informix and accessed via ArcSDE is an example of a RemoteDatabaseWorkspace.

The WorkspaceName for a workspace can be persisted, for example, in a map document. An application can call the Open method on the workspace name after loading it from persistent storage in order to connect to and get an object reference to the workspace.  A WorkspaceName name object can be returned from a workspace through the use of IDataset.FullName.

The IWorkspace interface provides methods for accessing various properties of a workspace, such as its connection properties, and the collection of datasets it contains.

See Also

IWorkspaceFactory Interface | IWorkspaceName Interface

.NET Snippets

Get FeatureClass From Shapefile On Disk | Create Grid From Feature Class | Open Network Dataset | Add Tracking Layer To Map | Set Data Source |

.NET Samples

Add and symbolize a historical temporal layer in ArcMap (Code Files: AddTemporalLayerButton) | Closest facility solver (Code Files: frmClosestFacilitySolver) | Create a custom NoData pixel filter (Code Files: TestApp) | Create a custom raster function (Code Files: TestWatermarkFunction WatermarkFunction) | Create a custom raster type (Code Files: TestThumbnailBuilder) | Create a Function Raster dataset (Code Files: CreateFunctionRasterDataset) | Create a Mosaic dataset (Code Files: CreateMosaicDataset) | Customizing schematic feature removal events (Code Files: FeatureRemovalMgmt) | Displaying MOLE symbology with the GlobeControl (Code Files: MainForm) | Extending the replication synchronization process (Code Files: RasterSyncWorkspaceExtension RegisterExtension) | Implementing a schematic digitizing tool (Code Files: DockableDigit) | Implementing associations between GIS features and schematic features (Code Files: ElementFeatureAssociation) | Import signposts (Code Files: SignpostUtilities) | Location-allocation solver (Code Files: frmLocationAllocationSolver) | Migrating from VB6 to VB .NET for ArcGIS 10 (Code Files: clscopy_table_sel) | Mosaic raster datasets to a file raster format (Code Files: CreateFileRasterMosaic) | Origin-destination cost matrix solver (Code Files: frmODCostMatrixSolver) | Play back tracking data (Code Files: PlaybackDataButton) | Publish an image service and set configurations (Code Files: ISConfig) | RSS weather GraphicTracker (Code Files: RSSWeather) | RSS weather layer (Code Files: AddWeatherItemTool RSSWeatherLayerClass) | Service area solver (Code Files: frmServiceAreaSolver) | Simple point plug-in data source (Code Files: OpenSimplePointDlg) | Timestamper class extension (Code Files: TimestampClassExtension) | Vehicle routing problem solver (Code Files: frmVRPSolver) |

.NET Related Topics

Assigning domains to fields | Cartographic representations | Connecting to a geodatabase | Converting data using GeoAnalyst objects | Converting simple data | Copying or loading data while preserving GlobalID values | Creating a topology in the geodatabase | Creating an address locator | Creating feature classes | Creating feature datasets | Creating fields | Creating geodatabases | Creating geometric networks within a geodatabase | Creating tables | Creating workspace extensions | Data processing in spatial analysis operations | DataSourcesGDB | DataSourcesOleDB | DataSourcesRaster | DefenseSolutions | Editing with the geodatabase API | Executing a map algebra expression | Finding differences between versions | GeoAnalyst | GeoData services | Geodatabase | Geodatabase API best practices | GeoDatabaseUI | Getting a list of schema differences between replicas | How to access members that control the CAD drawing dataset | How to add a feature class or table to an existing replica | How to change label formats and marks on an axis using a line graph | How to connect to ArcGIS Tracking Server | How to convert a raster dataset to a JPEG2000 raster dataset | How to convert coordinate arrays | How to create a 3D pie graph | How to create a box plot graph | How to create a dynamic geocoded feature class | How to create a function series graph | How to create a histogram graph | How to create a Mosaic dataset | How to create a mosaic layer | How to create a referenced mosaic dataset | How to create a selection set using a scatter plot graph | How to create a vertical stack area graph | How to create an edit session | How to create an image server layer | How to create graph series with different color types | How to create multiple vertical bar graphs | How to export a dataset to XML | How to find the address closest to a point using reverse geocoding | How to geocode a single address | How to geocode a table of addresses | How to get CAD transformation properties (from, to, angle, and scale) | How to get the points of a two-point CAD transformation | How to import a dataset from XML | How to initialize a GeoDataServer object | How to listen to workspace edit events | How to open a Mosaic dataset | How to open a network dataset | How to open locator workspaces | How to rematch a geocoded feature class | How to return CAD drawing layer properties | How to return CAD transformation settings | How to save a function raster dataset into a raster dataset | How to save a mosaic dataset to a raster dataset | How to save raster data and set storage properties | How to set CAD transformation properties (from, to, angle, and scale) | How to set raster properties when saving as a raster | How to set the points of a two-point CAD transformation | How to sort data in the graph | How to split a raster dataset into multiple tiles | How to standardize an address | How to work with geocoding properties | Leveraging the schema cache | LocationUI | Managing edit sessions and edit operations | Migrating VB6 to VB.NET for ArcGIS 10 | Obtaining changes made in the current edit session | Performing a spatial analysis operation using objects | Pooling objects with server objects | Querying geodatabase properties | Updating attributes of existing features | Using ArcObjects as tool input | Using replica creation events to extend the replica creation process | Using the schema creator | Working with SQL workspaces | Working with the analysis environment |