Why doesn't this code work for Geoprocess Tool???

Discussion created by jvickrey79 on Jan 12, 2011
Latest reply on Jan 12, 2011 by Neil
I'm using ArcGIS 10 and my script is just a C# standalone console app.
In using the below code, it bombs on the gp.Execute line suggesting "Error HRESULT E_FAIL has been returned from a call to a COM component".  The Source path and the Target path appear to be correct.  Ideas anyone??  Thanks

 ESRI.ArcGIS.Geoprocessor.Geoprocessor gp = new ESRI.ArcGIS.Geoprocessor.Geoprocessor();
                gp.OverwriteOutput = true;
                ESRI.ArcGIS.ConversionTools.MetadataImporter MI = new MetadataImporter();
                MI.source = "K:\\GISTeam\\Data Services\\GIS Data\\Metadata\\PilotsFieldsUnits.xml";
                MI.target = "Database Connections\\SERVER-SQLPRD10 (devgis - sde).sde\\sde.DEVGIS.DevelopmentAndTesting\\sde.DEVGIS.PilotsFieldsUnits";
                gp.Execute(MI, null);