This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > DataSourcesGDB > ESRI.ArcGIS.DataSourcesGDB > Interfaces > ID > IDataServerManager Interface > IDataServerManager.IsConnected Property (ArcObjects .NET 10.4 SDK) |
Indicates whether the server is connected or not.
[Visual Basic .NET] Public ReadOnly Property IsConnected As Boolean
[C#] public bool IsConnected {get;}
[C++]
HRESULT get_IsConnected(
VARIANT_BOOL* IsConnected
);
[C++]
Parameters IsConnected [out, retval] IsConnected is a parameter of type VARIANT_BOOL
This method returns whether you are currenrtly connected to the database server.
// The following code example demonstrates how to extablish a connection to a database server in order
// to retrieve some of the standard properties
public void esriDataSourcesGDB__IDataServerManager_DisplayProperties()
{
// Create a Data Server Manager object
IDataServerManager dataserverManager=new DataServerManagerClass();
dataserverManager.ServerName="minnie\\sqlexpress";
dataserverManager.Connect();
// Display some of the standard properties
Console.WriteLine("AvailableMemory : " + dataserverManager.AvailableMemory);
Console.WriteLine("DataServerType : " + dataserverManager.DataServerType);
Console.WriteLine("IsConnected : " + dataserverManager.IsConnected);
Console.WriteLine("ProductName : " + dataserverManager.ProductName);
Console.WriteLine("ProductVersion : " + dataserverManager.ProductVersion);
Console.WriteLine("DataServerClass : " + dataserverManager.DataServerClass);
}