deleusto

arcpy to get properties of OLE DB to Access database

Discussion created by deleusto on Jun 11, 2012
I created an OLE DB connection to an Access database in ArcCatalog.
In the Data Link properties, I entered in the Connection tab the path to my database: "c:\Users\Tom\myDB.mdb"
I renamed the connection is ArcCatalog to "RDS_TMC.odc".
In ArcMap, using arcpy, I need to retrieve from the "RDS_TMC.odc" the path and database to which the connection refers.

So I use:
>>> desc = arcpy.Describe(r"Database Connections\RDS_TMC.odc")
>>> print desc.workspaceType
RemoteDatabase
>>> print desc.connectionProperties
<geoprocessing describe data object object at 0x2B6AAF38>
>>> cp = desc.connectionProperties
>>> print cp.database
Runtime error <type 'exceptions.RuntimeError'>: DescribeData: Method database does not exist

So I need to know the method or attribute to get the path and database that is stored somewhere in the "RDS_TMC.odc" file.
Any idea which method applies?

Thanks,

Tom

Outcomes