IDatabaseConnectionInfo Interface

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

When To Use

Use IDatabaseConnectionInfowhen 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 ConnectionPropertieson the IWorkspaceinterface.

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 ConnectedUserproperty will return "dbo" as the connected user while IWorkspace::ConnectionPropertieswill 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.

IDatabaseConnectionInfo.ConnectedDatabase Property

The name of the connected database. It may be different from the DATABASE property in the workspace's connection properties.

Public ReadOnly Property ConnectedDatabase As String
public string ConnectedDatabase {get;}

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.

IDatabaseConnectionInfo.ConnectedUser Property

The name of the connected user. It may be different from the USER property in the workspace's connection properties.

Public ReadOnly Property ConnectedUser As String
public string ConnectedUser {get;}

Remarks

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

Classes that implement IDatabaseConnectionInfo

Classes Description
Workspace Workspace Object.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.