Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is

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?

Thanks.

share|improve this question

1 Answer 1

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:

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.camlquery.createallitemsquery.aspx

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

 
discard

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.