This document is archived and information here might be outdated. Recommended version. |
Initializes a saved connection to the GIS Data Server.
[Visual Basic .NET]
Public Sub InitFromFile ( _
ByVal gdsFileName As String _
)
[C#]
public void InitFromFile (
string gdsFileName
);
[C++]
HRESULT InitFromFile(
BSTR gdsFileName
);
[C++] Parameters gdsFileName [in]
gdsFileName is a parameter of type BSTR
This method initializes a Data Server from a Database Server connection file (.gds).
The .gds file is created using the Add Database Server option in ArcCatalog, or the CreateConnectionFile method.
// The following code example demonstrates how to extablish a connection to a database server.
public void esriDataSourcesGDB__IDataServerManager_InitFromFile()
{
// Create a Data Server Manager object
IDataServerManager dataserverManager = new DataServerManagerClass();
dataserverManager.InitFromFile("C:\\Documents and Settings\\craig\\Application Data\\ESRI\\ArcCatalog\\TIVO_SQLEXPRESS.GDS");
dataserverManager.Connect();
}