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


IGeoDataServerInit.InitFromConnectionString Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > GeodatabaseDistributed > ESRI.ArcGIS.GeoDatabaseDistributed > Interfaces > IG > IGeoDataServerInit Interface > IGeoDataServerInit.InitFromConnectionString Method
ArcGIS Developer Help

IGeoDataServerInit.InitFromConnectionString Method

Initializes a GeoDataServer object from a connection string to a geodatabase.

[Visual Basic .NET]
Public Sub InitFromConnectionString ( _
    ByVal connectionString As String _
)
[C#]
public void InitFromConnectionString (
    string connectionString
);
[C++]
HRESULT InitFromConnectionString(
  BSTR connectionString
);
[C++]
Parameters
connectionString [in]

connectionString is a parameter of type BSTR

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.
[C#]

The following code initializes a GeoDataServer for an ArcSDE geodatabase using a connection string

IGeoDataServer pGDSparent = new GeoDataServerClass();
IGeoDataServerInit  pGDSparentInit = (IGeoDataServerInit)pGDSparent;
pGDSparentInit.InitFromConnectionString("SERVER=bobmk;INSTANCE=5151;VERSION=sde.DEFAULT;USER=bob;PASSWORD=bob");

See Also

IGeoDataServerInit Interface