This document is archived and information here might be outdated.  Recommended version.

IWorkspaceFactory.Create Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IW > IWorkspaceFactory Interface > IWorkspaceFactory.Create Method
ArcGIS Developer Help

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
public IWorkspaceName Create (
    string parentDirectory,
    string Name,
    IPropertySet ConnectionProperties,
    int hWnd
  BSTR parentDirectory,
  BSTR Name,
  IPropertySet* ConnectionProperties,
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

Product Availability

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


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 Mosaic dataset Create a custom raster type Create a custom raster type from the ground up for DMCII data