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

420
1
04-24-2014 11:51 PM
RavindraSingh
Occasional Contributor
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
0 Kudos
1 Reply
RavindraSingh
Occasional Contributor
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



NOTE-1::

  • Even though In AddDataControl of Engine, its working perfect. in case of both "Application" & "Direct" connection.

  • This Exception is occurring, when making "Application Connection", but in case of "Direct connection", its working fine... using ArcObject SDK.

0 Kudos