SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


Dim _Query = CamlQuery.CreateAllItemsQuery

a valid query?

Or should it be:

Dim _Query = CamlQuery.CreateAllItemsQuery()

Or do I have to use:

Dim _Query As New CamlQuery()
_Query.ViewXml = "<View><Where><FieldRef Name='FullName'></Where></View>"

In which case what should my XML be to return all fields from all list items?


share|improve this question
up vote 0 down vote accepted

Both Dim _Query = CamlQuery.CreateAllItemsQuery and Dim _Query = CamlQuery.CreateAllItemsQuery() are valid. They are the same query, with a slight difference in syntax. The CamlQuery.CreateAllItemsQuery returns all list items in a list.

The Javascript OM description of this method states:

A query that can be used to recursively get all of the items in a list.

There is an overloaded version of this method in the CSOM to limit your returned values as well:

share|improve this answer
Thanks a lot rjcup3. – finisterre Oct 15 '12 at 13:52
Np. I remember what my first Silverlight / CSOM project was like... – RJ Cuthbertson Oct 15 '12 at 14:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.