This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > GeoDatabaseDistributed > ESRI.ArcGIS.GeoDatabaseDistributed > Interfaces > IG > IGeoDataServerInit Interface > IGeoDataServerInit.InitFromConnectionString Method (ArcObjects .NET 10.4 SDK) |
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
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");