shekhawatravi

Not able to get the RasterDataset from ArcSDE 10/10.1 using ArcGIS Engine 10.2.2

Discussion created by shekhawatravi on Apr 24, 2014
Latest reply on Apr 27, 2014 by shekhawatravi
Getting following error while accessing the RaterDataset from ArcSDE 10/10.1 using ArcGIS engine 10.2.2. But When do the same thing using ArcGIS Engine 10 it works fine.

NOTE:: The raster data exists in ArcSDE, I am able to access this using ArcMap and able to render it properly too using ArcGIS Engine 10 as well as ArcMap 10/10.1 both.

Following is the code snippet::

IEnumDatasetName datasetNames = workspace.getDatasetNames(esriDatasetType.esriDTRasterDataset);
IDatasetName datasetName = datasetNames.next();

IRasterWorkspaceEx pRWS = new IRasterWorkspaceExProxy(workspace);

while (datasetName != null) {
try {
// Here at below line getting the exception......
IRasterDataset pRasterDataset = pRWS.openRasterDataset(datasetName.getName());
IRasterLayer pRasterLyr = new RasterLayer();
pRasterLyr.createFromDataset(pRasterDataset);
int bandCount = pRasterLyr.getBandCount();
}catch(Exception ex){
ex.printStackTrace();
}
}



AutomationException: 0x8000000a - The data necessary to complete this operation is not yet available.
Apr 25, 2014 1:06:59 PM com.lgc.gis.common.StreamConsumer run
INFO: GIS: at com.esri.arcgis.interop.NativeObjRef.nativeVtblInvokeNative(Native Method)
Apr 25, 2014 1:06:59 PM com.lgc.gis.common.StreamConsumer run
INFO: GIS: at com.esri.arcgis.interop.NativeObjRef.a(Unknown Source)
Apr 25, 2014 1:06:59 PM com.lgc.gis.common.StreamConsumer run
INFO: GIS: at com.esri.arcgis.interop.NativeObjRef.a(Unknown Source)
Apr 25, 2014 1:06:59 PM com.lgc.gis.common.StreamConsumer run
INFO: GIS: at com.esri.arcgis.interop.Dispatch.vtblInvoke(Unknown Source)
Apr 25, 2014 1:06:59 PM com.lgc.gis.common.StreamConsumer run
INFO: GIS: at com.esri.arcgis.geodatabase.IRasterWorkspaceExProxy.openRasterDataset(Unknown Source)
Apr 25, 2014 1:06:59 PM com.lgc.gis.common.StreamConsumer run

Outcomes