Help me with ZonalStatisticsAsTable

Discussion created by eber2301 on Jun 12, 2011
How can I save table?
I'm using this code

Dim pMxDocument As IMxDocument
Dim pMap As IMap
Dim pZoneRL As IRasterLayer
Dim pZoneRaster As IRaster
Dim pValueRL As IRasterLayer
Dim pValueRaster As IRaster
Set pMxDocument = Application.Document
Set pMap = pMxDocument.FocusMap
Set pValueRL = pMap.Layer(0)
Set pValueRaster = pValueRL.Raster
Set pZoneRL = pMap.Layer(1)
Set pZoneRaster = pZoneRL.Raster
Dim pOutputTable As ITable
Set pOutputTable = pZonalOp.ZonalStatisticsAsTable(pZoneRaster, pValueRaster, True)

Dim pTableCollection As ITableCollection
Dim pMxDoc As IMxDocument
Set pMxDoc = Application.Document
Set pTableCollection = pMap
Dim pFWS As IFeatureWorkspace
Dim pWorkspaceFactory As IWorkspaceFactory
Set pWorkspaceFactory = New ShapefileWorkspaceFactory
Set pFWS = pWorkspaceFactory.OpenFromFile("C:\TEMP\ZONAL", 0)
Dim tablasal As ITable
Set tablasal = pFWS.CreateTable(Name, pOutputTable.Fields, Nothing, Nothing, 0)

I need to save pOutputTable or copy rows from pOutputTable to tablasal.