ArcObjects Library Reference  (Carto)    

esriCarto StandaloneTable Example

[Visual Basic 6.0]
Public Sub TableSel()
  Dim pMxDoc As IMxDocument
  Dim pMap As IStandaloneTableCollection
  Dim pStdAloneTbl As IStandaloneTable
  Dim pTableSel As ITableSelection
  Dim pQueryFilt As IQueryFilter
  Dim pSelSet As ISelectionSet
  
' Get the standalone table from the map
  Set pMxDoc = Application.Document
  Set pMap = pMxDoc.FocusMap
  Set pStdAloneTbl = pMap.StandaloneTable(0)
  Set pTableSel = pStdAloneTbl
' Make the query filter
  Set pQueryFilt = New QueryFilter
  pQueryFilt.WhereClause = "POP1990 > 10000000"
' Perform the selection
  pTableSel.SelectRows pQueryFilt, esriSelectionResultNew, False
' Report how many rows were selected
  Set pSelSet = pTableSel.SelectionSet
  MsgBox pSelSet.Count & " rows selected in " & pStdAloneTbl.Name
End Sub

[Visual Basic .NET, C#, C++]
No example is available for Visual Basic .NET, C#, or C++. To view a Visual Basic 6.0 example, click the Language Filter button Language Filter in the upper-left corner of the page.