com.esri.arcgis.geodatabase
Class IDatabaseConnectionInfoProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geodatabase.IDatabaseConnectionInfoProxy
All Implemented Interfaces:
IDatabaseConnectionInfo, Externalizable, Serializable
Direct Known Subclasses:
IDatabaseConnectionInfo2Proxy

public class IDatabaseConnectionInfoProxy
extends com.esri.arcgis.interop.Dispatch
implements IDatabaseConnectionInfo, 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, Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IDatabaseConnectionInfoProxy()
           
  IDatabaseConnectionInfoProxy(Object obj)
           
protected IDatabaseConnectionInfoProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 String getConnectedDatabase()
          The name of the connected database.
 String getConnectedUser()
          The name of the connected user.
 void removeListener(String iidStr, Object theListener)
           
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IDatabaseConnectionInfoProxy

public IDatabaseConnectionInfoProxy()

IDatabaseConnectionInfoProxy

public IDatabaseConnectionInfoProxy(Object obj)
                             throws IOException
Throws:
IOException

IDatabaseConnectionInfoProxy

protected IDatabaseConnectionInfoProxy(Object obj,
                                       String iid)
                                throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

getConnectedDatabase

public 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

Specified by:
getConnectedDatabase in interface IDatabaseConnectionInfo
Returns:
The db
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConnectedUser

public 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

Specified by:
getConnectedUser in interface IDatabaseConnectionInfo
Returns:
The user
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.