ArcObjects Library Reference  (GeoDatabase)    

IWorkspaceFactory.Create Method

Creates a new workspace specified by the directory, file name, and connection properties.

[Visual Basic 6.0]
Function Create(
    ByVal parentDirectory As String, _
    ByVal Name As String, _
    ByVal ConnectionProperties As IPropertySet, _
    ByVal hWnd As OLE_HANDLE _
) As IWorkspaceName
[Visual Basic .NET]
Public Function Create ( _
    ByVal parentDirectory As String, _
    ByVal Name As String, _
    ByVal ConnectionProperties As IPropertySet, _
    ByVal hWnd As Integer _
) As IWorkspaceName
[C#]
public IWorkspaceName Create (
    string parentDirectory,
    string Name,
    IPropertySet ConnectionProperties,
    int hWnd
);
[Java]
public IWorkspaceName create (
    String parentDirectory,
    String Name,
    IPropertySet ConnectionProperties,
    int hWnd
)
throws
    IOException,
    AutomationException
[C++]
HRESULT Create(
  BSTR parentDirectory,
  BSTR Name,
  IPropertySet* ConnectionProperties,
  OLE_HANDLE hWnd,
  IWorkspaceName** WorkspaceName
);
[C++]

Parameters

parentDirectory [in]

  parentDirectory is a parameter of type BSTR

Name [in]

  Name is a parameter of type BSTR

ConnectionProperties [in]

  ConnectionProperties is a parameter of type IPropertySet

hWnd [in]

  hWnd is a parameter of type OLE_HANDLE

WorkspaceName [out, retval]

  WorkspaceName is a parameter of type IWorkspaceName

Product Availability

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

Remarks

Create has different results depending on the type of workspace factory. If you are working with ArcSDE, a new connection file (.sde) is created. If you are working with an ArcInfo workspace factory, then a folder with an INFO subfolder is created. The optional ConnectionProperties parameter specifies any additional connection properties needed, such as the server, instance, user and password in the case where a connection file to a remote database workspace is being created. If no connection properties are specified, then this method will result in a dialog being displayed that prompts the user for the required properties.

See Also

IWorkspaceFactory Interface

Example

IWorkspaceFactory Create Example

 


Feedback Send feedback on this page