[GIS] How to create a 9.3 file geodatabase with ArcObjects SDK for ArcGIS 10

arcgis-10.0arcobjectsesri-geodatabase

In ArcGIS 10 I could use the Create File GDB geoprocessing tool to create a 9.3 file geodatabase or the Create Personal GDB geoprocessing tool to create a 9.3 personal geodatabase.
But I cant't find a similar method in the ArcObjects SDK for ArcGIS 10. The IWorkspaceFactory2.Create method seems only to create geodatabases compatible with ArcGIS 10.

Possible workarounds are:

But is there really no possibility to create a 9.3 Geodatabase with the ArcObjects SDK for ArcGIS 10?

Best Answer

You can do it with the geoprocessor (add using ESRI.ArcGIS.Geoprocessor; and using ESRI.ArcGIS.DataManagementTools; to your class file).

            //Initialize GeoProcessor
            Geoprocessor geoProcessor = new Geoprocessor();

            //Create file geodatabase 
            CreateFileGDB createFileGDB = new CreateFileGDB();
            createFileGDB.out_folder_path = @"c:\temp";
            createFileGDB.out_name = "chickens";
            createFileGDB.out_version = "9.3";

            geoProcessor.Execute(createFileGDB, null);
Related Question