com.esri.arcgis.geodatabase
Interface IDatabaseConnectionInfo

All Superinterfaces:
Serializable
All Known Subinterfaces:
IDatabaseConnectionInfo2
All Known Implementing Classes:
IDatabaseConnectionInfo2Proxy, IDatabaseConnectionInfoProxy, Sde4Workspace, SqlWorkspace, VersionedWorkspace, Workspace

public interface IDatabaseConnectionInfo
extends Serializable

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

Superseded By

IDatabaseConnectionInfo2

When To Use

Use IDatabaseConnectionInfo when you want to get the name of the user or database from a workspace if that user or database is different from that in connection properties returned by ConnectionProperties on the IWorkspace interface.

For example, when connected to a SQLServer database with a login that is a member of the sysadmin fixed server role, that login's username in SQLServer is "dbo". The ConnectedUser property will return "dbo" as the connected user while IWorkspace::ConnectionProperties will return the name of the user with this role.

Product Availability

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

See Also:
IPropertySet, IWorkspace

Method Summary
 String getConnectedDatabase()
          The name of the connected database.
 String getConnectedUser()
          The name of the connected user.
 

Method Detail

getConnectedDatabase

String getConnectedDatabase()
                            throws IOException,
                                   AutomationException
The name of the connected database. It may be different from the DATABASE property in the workspace's connection properties.

Remarks

If the underlying DBMS does not support multiple databases or is a Personal or File Geodatabase, the ConnectedDatabase property will return an empty string.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getConnectedUser

String getConnectedUser()
                        throws IOException,
                               AutomationException
The name of the connected user. It may be different from the USER property in the workspace's connection properties.

Remarks

If used with a Personal or File Geodatabase, the ConnectedUser property will return an empty string.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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