I want to find out if either a file or personal geodatabase is 9.3, 10.0, 10.1, etc
Is there a way to do this using Python?
I would try the Describe Workspace release property
Here's an ArcObjects + comtypes solution that works for me at 10.0:
Note: Be warned that this also returns 10.0 for 10.1 geodatabases when run from ArcGIS 10.0! Edit: Actually this returns 10.0 for a 10.1 file geodatabase when run from ArcGIS 10.1 as well! Not sure what is going on :|
|show 1 more comment|
Good question! In 10.0, I cannot find any Python method for describing the version of the geodatabase. I've tested using the Upgrade geodatabase GP tool in 10.1 and it might be helpful.
"The Upgrade Geodatabase tool will only work against geodatabases that are at a previous release."
This means we can test running this tool without setting the option "Upgrade geodatabase" just to see if it will execute (if the geodatabase is of the same version it won't execute). If it will - then it is of current version (only the pre-requisites check will be performed and the geodatabase will be left untouched).
Regarding testing 9.3 and 10.1 - I was thinking of trying to create a sample dataset that is possible to create only in geodatabase of version 10.0 / 10.1 and then check if it gets created. If not - then it is 9.3 / 10.1.
Not the most elegant solution though...