com.esri.arcgis.geodatabase
Interface IDatabaseConnectionInfo2

All Superinterfaces:
IDatabaseConnectionInfo, Serializable
All Known Subinterfaces:
IDatabaseConnectionInfo3, IDatabaseConnectionInfo4
All Known Implementing Classes:
IDatabaseConnectionInfo2Proxy, SqlWorkspace

public interface IDatabaseConnectionInfo2
extends IDatabaseConnectionInfo, Serializable

Provides access to members that provide information about the Workspace's connected database.

When To Use

Use IDatabaseConnectionInfo2 when you want to know the type of DBMS the workspace is connected to. For example, when connected to a SQLServer database ConnectionDBMS will return the enumeration value corresponding to a SQLServer database.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 Object getConnectionCurrentDateTime()
          The current DBMS date/time.
 int getConnectionDBMS()
          The type of DBMS this workspace is connected to.
 String getConnectionServer()
          The server this workspace is connected to.
 int getGeodatabaseServerClass()
          The ArcSDE server class.
 
Methods inherited from interface com.esri.arcgis.geodatabase.IDatabaseConnectionInfo
getConnectedDatabase, getConnectedUser
 

Method Detail

getConnectionDBMS

int getConnectionDBMS()
                      throws IOException,
                             AutomationException
The type of DBMS this workspace is connected to.

Remarks

Returns an enumeration value corresponding to the connected DBMS. This might be particularly useful when implementing code that must access a number of different remote database types and depending on the underlying DBMS, change the code accordingly.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A com.esri.arcgis.geodatabase.esriConnectionDBMS constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConnectionCurrentDateTime

Object getConnectionCurrentDateTime()
                                    throws IOException,
                                           AutomationException
The current DBMS date/time.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGeodatabaseServerClass

int getGeodatabaseServerClass()
                              throws IOException,
                                     AutomationException
The ArcSDE server class.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A com.esri.arcgis.geodatabase.esriGeodatabaseServerClassType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConnectionServer

String getConnectionServer()
                           throws IOException,
                                  AutomationException
The server this workspace is connected to.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The server
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.