help me ! there are error when executing  IZonalOp.ZonalStatisticsAsTable

Discussion created by lzpolestar on Jul 24, 2013
Latest reply on Mar 3, 2015 by marco.belotti
When I use tool zonalstatistics as table or zonstatistics in ArcToolBox 10.1,I can get the result without error.
But when I use C# and IZonalOp.ZonalStatisticsAsTable( or pZonalOp.ZonalStatistics ) in ArcObjects 10.1,There are error as follows:
ERROR 010316: Unable to open the input raster: C:\USERS\ADMINI~1\APPDATA\LOCAL\TEMP\G_G722
ERROR 010067: Error in executing grid expression.
I have read many posts,but no one can...:(
My codes are listed as follows.Help Me!

ISurfaceOp2 pSurfaceOp = new RasterSurfaceOpClass();
object Missing = Type.Missing;
IRasterDataset rasterDataset = default(IRasterDataset);
rasterDataset = pdemWorkspace.OpenRasterDataset(demName);//"SDE.Slope_SDE1"
IGeoDataset pdemGeoDs = (IGeoDataset)rasterDataset;
IGeoDataset pOutputRaster = pSurfaceOp.Slope(pdemGeoDs, esriGeoAnalysisSlopeEnum.esriGeoAnalysisSlopeDegrees, ref Missing);//ç??æ??å?¡åº¦å?¾generate a slope map
IFeatureClass pgridfeatClass = default(IFeatureClass);
pgridfeatClass = pgridWorkspace.OpenFeatureClass(gridName);
IGeoDataset pgridDs = pgridfeatClass as IGeoDataset;
IZonalOp pZonalOp = new RasterZonalOpClass();
ITable pTable = pZonalOp.ZonalStatisticsAsTable(pgridDs, pOutputRaster, true);//Error occurs