This document is archived and information here might be outdated.  Recommended version.


IDatabaseConnectionInfo Interface (ArcObjects .NET 10.7 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > ID > IDatabaseConnectionInfo Interface
ArcGIS Developer Help

IDatabaseConnectionInfo Interface

Provides access to members that provide information about the Workspace's connected database. Note: the IDatabaseConnectionInfo interface has been superseded by IDatabaseConnectionInfo2. Please consider using the more recent version.

Product Availability

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

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.

Members

Name Description
Read-only property ConnectedDatabase The name of the connected database. It may be different from the DATABASE property in the workspace's connection properties.
Read-only property ConnectedUser The name of the connected user. It may be different from the USER property in the workspace's connection properties.

Classes that implement IDatabaseConnectionInfo

Classes Description
Sde4Workspace (esriDataSourcesGDB) Esri SDE (4.x) Feature Database.
VersionedWorkspace VersionedWorkspace Object.
Workspace Workspace Object.

See Also

IWorkspace Interface | IWorkspaceFactory Interface | IPropertySet Interface

.NET Samples

Timestamper class extension