Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function GetRestaurants(ByVal table As ITable) As ICursor
- ' Create the query filter.
- Dim queryFilter As IQueryFilter = New QueryFilterClass()
- ' Select the fields to be returned - the name and address of the businesses.
- queryFilter.SubFields = "NAME, ADDRESS"
- ' Set the filter to return only restaurants.
- queryFilter.WhereClause = "TYPE = 'Restaurant'"
- ' Use the PostfixClause to alphabetically order the set by name. Although this
- ' has no effect on a File geodatabase, this will work for Personal and SDE
- ' geodatabases.
- Dim queryFilterDef As IQueryFilterDefinition = CType(queryFilter, IQueryFilterDefinition)
- queryFilterDef.PostfixClause = "ORDER BY NAME"
- Dim cursor As ICursor = table.Search(queryFilter, True)
- Return cursor
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement