ArcObjects Library Reference (GeoDatabase)  

IWorkspaceFactory.Create Method

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

[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
);
[C++]
HRESULT Create(
  BSTR parentDirectory,
  BSTR Name,
  IPropertySet* ConnectionProperties,
  long 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 long 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 ArcGIS for Desktop Advanced workspace factory, 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, this method will result in a dialog being displayed that prompts the user for the required properties.

See Also

IWorkspaceFactory Interface

.NET Samples

Create a custom raster type (Code Files: TestThumbnailBuilder) | Create a custom raster type from the ground up for DMCII data (Code Files: TestDMCIIRasterType) | Create a Mosaic dataset (Code Files: CreateMosaicDataset)

.NET Related Topics

Creating geodatabases | DataSourcesGDB | Working with server contexts