AnsweredAssumed Answered

ICursor with Single Table problem

Question asked by davecouture on Jul 18, 2012
Latest reply on Jul 18, 2012 by davecouture
I'm working with a GDB Single Table (not an attribute table) and I'm having problem with retrieving field values, because I'm not sure how to handle the ICursor, on Single Tables. I can select a Single Table in the TOC, I can perform a query and I can find out if a field exists, but I can't retrieve values. I'm missing something like feature = cursor.NextFeature., to move down the records and retreive values. But, I can't use IFeature and IFeatureCursor interfaces, because it's not an attribute table.

This is the code stripped down:




                Dim subdivisionTable As ITable = GetTable(tableName, pMap)
                Dim queryFilter As ESRI.ArcGIS.Geodatabase.IQueryFilter = New ESRI.ArcGIS.Geodatabase.QueryFilterClass()
                queryFilter.WhereClause = "PID = '163922'"
                Dim cursor As ESRI.ArcGIS.Geodatabase.ICursor = subdivisionTable.Search(queryFilter, False)
                Dim panField As Integer = subdivisionTable.FindField("PAN")
            
                If panField = -1 Then
                    MsgBox("field doesn't exists")
                    Return
                Else
                    MsgBox(subdivisionTable.Value(panField))
                End If

Outcomes