ArcObjects Library Reference (GeoDatabaseDistributed)  

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

.NET Related Topics

How to initialize a GeoDataServer object