AnsweredAssumed Answered

How to specify an SDE geodatabase when calling Geoprocessor from C#

Question asked by tedrakel_power on May 4, 2017
Latest reply on May 4, 2017 by tedrakel_power

I'm using ArcGIS 10.2.1.  I'm writing a C# console application that calls the Geoprocessor in order to execute the FeatureClassToFeatureClass tool.  This works fine when I'm using a file geodatabase.  However, I want to use an SDE geodatabase.  I can't seem to get the output_path specified correctly.  I keep getting exceptions and the FeatureClassToFeatureClass tool does not create a new feature class.  The code is shown below.  If I use a file geodatabase path for the in_features and out_path, like "C:\data\Test.gdb", then the GP.Execute tool runs fine.  I seem to be specifying the out_path and possibly the out_name incorrectly when using an SDE geodatabase, but I'm don't know the proper format.


GP = new Geoprocessor();
FeatureClassToFeatureClass fcTofc = new FeatureClassToFeatureClass();
fcTofc.in_features = @"Database Connections\gistest.sde\ARCGIS.SEP";
fcTofc.out_path = @"Database Connections\gistest.sde";
fcTofc.out_name = "SEP_copy";
GP.Execute(fcTofc, null);