The following sample code was used for this method.
'get the site
Dim curSite As SPSite = New SPSite("http://myPortal")
'get the web
Dim curWeb As SPWeb = curSite.OpenWeb()
'create our query
Dim curQry As SPQuery = New SPQuery()
'configure the query
curQry.Query = "
Hotel
curQry.RowLimit = 100
'get our list
Dim curList As SPList = curWeb.Lists(New Guid("myListGUID"))
'get the collection of items in the list
Dim curItems As SPListItemCollection = curList.GetItems(curQry)
'enumerate the items in the list
For Each curItem As SPListItem In curItems
'do something with each match
Next
No comments:
Post a Comment