ArcObjects Library Reference (GeoDatabase)  

IDatabaseConnectionInfo Interface

Provides access to members that provide information about the Workspace's connected database. Note: the IDatabaseConnectionInfo interface has been superseded byIDatabaseConnectionInfo2. 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

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.

CoClasses that implement IDatabaseConnectionInfo

CoClasses and Classes Description
Sde4Workspace (esriDataSourcesGDB) Esri SDE (4.x) Feature Database.
SqlWorkspace (esriDataSourcesGDB) Sql workspace
VersionedWorkspace VersionedWorkspace Object.
Workspace Workspace Object.

See Also

IWorkspace Interface | IPropertySet Interface

.NET Samples

Timestamper class extension (Code Files: TimestampClassExtension)