In my ArcGIS Python code, I need to loop over a couple of layers, and from those layers only select the operational fittings:
arcpy.SelectLayerByAttribute_management(fittings, "NEW_SELECTION", whereClause)
Some of my layers are stored in a personal geodatabase (.mdb) and some in a file geodatabase (.gdb), which has an impact on the syntax of the "whereClause" string, because the mdb needs square brackets for the queried field name, whereas the gdb doesn't:
if database = GDB: # This line is pseudo-code which I need resolving whereClause = "LIFECYCLESTATUS = 'LIVE'" else: whereClause = "[LIFECYCLESTATUS] = 'LIVE'"
My question is: how can I determine if a layer data source is in an mdb or in a gdb? I've managed to get to
desc = arcpy.Describe(fittings) delm = desc.dataElement
But after this, I am stuck. How/Where can I find the available properties for the "dataElement" class?