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


IWorkspaceFactory.Open Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (GeoDatabase)  

IWorkspaceFactory.Open Method

Opens the workspace specified by the connection properties.

[Visual Basic .NET]
Public Function Open ( _
    ByVal ConnectionProperties As IPropertySet, _
    ByVal hWnd As Integer _
) As IWorkspace
[C#]
public IWorkspace Open (
    IPropertySet ConnectionProperties,
    int hWnd
);
[C++]
HRESULT Open(
  IPropertySet* ConnectionProperties,
  long hWnd,
  IWorkspace** Workspace
);
[C++]

Parameters ConnectionProperties [in]
ConnectionProperties is a parameter of type IPropertySet hWnd [in] hWnd is a parameter of type long Workspace [out, retval]
Workspace is a parameter of type IWorkspace

Product Availability

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

Remarks

Open takes as input a property set of connection properties that specify the workspace to connect to. In the case of file system workspaces and local database workspaces, a single property named DATABASE, whose value is the pathname to the workspace, is usually all that is required. In the case of remote database workspaces accessed via ArcSDE the properties can include the USER, PASSWORD, DATABASE, SERVER, INSTANCE, VERSION, HISTORICAL_NAME, HISTORICAL_TIMESTAMP, and AUTHENTICATION_MODE properties of the database being connected to.

List of acceptable connection property names and a brief description of each

"SERVER" � SDE server name you are connecting to.

"INSTANCE" � Instance you are connection to.

"DATABASE" � Database connected to.

"USER" � Connected user.

"PASSWORD" � Connected password.

"AUTHENTICATION_MODE" � Credential authentication mode of the connection. Acceptable values are "OSA" and "DBMS".

"VERSION" � Transactional version to connect to. Acceptable value is a string that represents a transaction version name.

"HISTORICAL_NAME" � Historical version to connect to. Acceptable value is a string type that represents a historical marker name.

"HISTORICAL_TIMESTAMP" � Moment in history to establish an historical version connection. Acceptable value is a date time that represents a moment timestamp.

 

Notes:

See Also

IWorkspaceFactory Interface

.NET Samples

Adding a real-time feed to ArcMap (Code Files: AddTrackingServerLayerButton) | 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

Connecting to geodatabases and databases | Creating an address locator | DataSourcesGDB | DataSourcesOleDB | DataSourcesRaster | Geodatabase | How to connect to ArcGIS Tracking Server | How to open locator workspaces | How to rematch a geocoded feature class | How to standardize an address | LocationUI