AnsweredAssumed Answered

identifying the type of database

Question asked by bmerson on Jun 2, 2011
Latest reply on Jun 3, 2011 by rdharles
I'm new to both Python and arcpy.  I couldn't find the answer to this in the docs or in searching the forums.

I have a script that gets an input feature class.  I need to make a query on the class.  However, personal geodatabases use a different query string field name format ([FIELD]) than do all the file-based databases ("FIELD").  I could make the query string a parameter and force the user to deal with this, but for reasons too boring to go into, I'd prefer to build the query myself.

Is there some way to find out what type of database you are querying given a feature class from that database?   I saw that the Describe function for workspaces provides some information, but it does not seem to distinguish between database types.  So far, I have been unable to find a way to do this, but that could easily be because I don't know precisely where to look yet.  Any help would be appreciated.

Outcomes