Interface IWorkspace2
- Namespace
- ESRI.ArcGIS.Geodatabase
- Assembly
- ESRI.Server.Geodatabase.dll
Provides access to members that have information about the workspace.
[Guid("4B21005E-01DF-4945-9038-ADCBD17A0F2E")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IWorkspace2
Properties
NameExists[esriDatasetType, string]
Indicates if a dataset with the given name exists within the workspace.
bool NameExists[esriDatasetType Type, string Name] { get; }
Parameters
TypeesriDatasetTypeNamestring
Property Value
Remarks
NameExists allows you to determine if a dataset of the specified type and the supplied name already exists within the Workspace. When the name string parameter is not qualified, NameExists will return True if any objects of the specified dataset type exist in the Workspace with the current user as the owner. When a fully qualified name parameter is specified, NameExists will return True if an object of the specified dataset corresponds to the qualified name (on ArcSDE geodatabases, a fully qualified name would be databasename.username.tablename). NameExists will also consider tables that are not registered with the geodatabase.
The specified type must be supplied, the esriDTAny value is not supported.
If you would like to find out if a specific feature class exists in a feature dataset, you shouldloop through the results of IFeatureClassContainer::ClassByName, as NameExists will always check the entire Workspace for the existence of the feature class.