Interface IWorkspaceName

Namespace
ESRI.ArcGIS.Geodatabase
Assembly
ESRI.Server.Geodatabase.dll

Provides access to members that supply workspace name information.

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("FADD975C-E36F-11D1-AA81-00C04FA33A15")]
public interface IWorkspaceName

Remarks

The IWorkspaceName interface lets you access the properties of a workspace name. To work with a workspace name, you must first set the WorkspaceFactoryProgID property and either the PathName or ConnectionProperties property.

The workspace name can refer to an existing workspace, or one that has yet to be created. If the workspace already exists, it can be opened with IName::Open--effectively this procedure is equivalent to opening a workspace using Open or OpenFromFile on IWorkspaceFactory. If the workspace does not exist and is to be created, use IWorkspaceFactory::Create.

In some circumstances, you may already have a full workspace object but require a workspace name instead. You can retrieve the workspace name from a workspace by calling calling IDataset::FullName on the workspace.

The Type, Category, WorkspaceFactoryProgID, and BrowseName properties all return information on the workspace; refer to the documentation on IWorkspace.

[C#]

    //e.g., workspacePath = "D:\data\geodatabases\Usa.mdb"
    public void IWorkspace__get_WorkspaceName(string workspacePath, IWorkspace workspace)
    {
        //Creates a new workspace name for a personal geodatabase.
        IWorkspaceName workspaceName = new WorkspaceNameClass();
        workspaceName.WorkspaceFactoryProgID = "esriDataSourcesGDB.AccessWorkspaceFactory";
        workspaceName.PathName = workspacePath;
        //Or Get a workspace name from an existing workspace.
        IDataset dataset = (IDataset)workspace; //Workspaces implement IDataset
        workspaceName = (IWorkspaceName)dataset.FullName;
    }









Properties

BrowseName

The browse name of the WorkspaceName.

string BrowseName { get; set; }

Property Value

string

Category

The category of the WorkspaceName.

string Category { get; }

Property Value

string

ConnectionProperties

The connection properties of the WorkspaceName.

IPropertySet ConnectionProperties { get; set; }

Property Value

IPropertySet

PathName

The path name of the WorkspaceName.

string PathName { get; set; }

Property Value

string

Type

The type of the associated workspace.

esriWorkspaceType Type { get; }

Property Value

esriWorkspaceType

WorkspaceFactory

The workspace factory of the WorkspaceName.

IWorkspaceFactory WorkspaceFactory { get; }

Property Value

IWorkspaceFactory

Remarks

<CODE> <P>A WorkspaceFactory is a dispenser of workspaces and allows a client to connect to a workspace specified by a set of connection properties. A workspace represents a database or a datasource that contains one or more datasets. Examples of datasets include tables, feature classes and relationship classes. A WorkspaceFactory is a cocreatable, singleton object. A WorkspaceFactory maintains a pool of currently connected, active workspaces that are being referenced by the application. Connection properties are specified using a PropertySet object and can be saved to a connection file. A WorkspaceFactory also supports methods that can be used to browse and manage file system workspaces, and methods to manage connection files for remote database workspaces.</P></CODE>

WorkspaceFactoryProgID

The ProgID of the WorkspaceName's workspace factory.

string WorkspaceFactoryProgID { get; set; }

Property Value

string