AnsweredAssumed Answered

Table Query

Question asked by davecouture on Jul 12, 2012
Latest reply on Jul 16, 2012 by davecouture
I'm trying to perform a Table Query using the PerformAttributeQuery snipet and I'm just trying to figure out how to select a table, for the function.


     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

         Dim queryFilter As String = "Code = '" + ComboBox1.Text.Trim + "'"
         Dim table as ESRI.ArcGIS.Geodatabase.ITable = ?????       
       
           MsgBox(PerformAttributeQuery(table, queryFilter)) 
  
     End Sub


    Public Function PerformAttributeQuery(ByVal table As ESRI.ArcGIS.Geodatabase.ITable, ByVal whereClause As System.String) As ESRI.ArcGIS.Geodatabase.ICursor

        Dim queryFilter As ESRI.ArcGIS.Geodatabase.IQueryFilter = New ESRI.ArcGIS.Geodatabase.QueryFilterClass()
        queryFilter.WhereClause = whereClause
        Dim cursor As ESRI.ArcGIS.Geodatabase.ICursor = table.Search(queryFilter, False)

        Return cursor

    End Function

Outcomes