IWorkspace.get_DatasetNames doesn't see raster just added through Geoprocessor

Discussion created by ssstanton on Jul 27, 2011
I'm seeing some strange behaviour when loading a raster into a file GDB using Geoprocessor.ExecuteAsync (which I'm using so that I can display a progress bar).

My application initially opens the GDB workspace, uses the CopyRaster tool, then uses the IWorkspace (IRasterWorkspaceEx) object to open the newly loaded raster as an IRasterDataset. No problem. However, if I call get_DatasetNames using the same IWorkspace, the returned IEnumDatasetName doesn't contain the new raster.

I tried refreshing the IWorkspace to see if that would help, but no. I also tried calling AOUninitialize.Shutdown then starting again from scratch, but that doesn't help either. It seems the only way I can see my new raster with get_DatasetNames is by closing my application down, then re-starting.

Has anyone else hit this problem?