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

In SharePoint 2010 SPQuery has the ViewFieldsOnly property that apparently optimises the query by only returning the data you specifically ask for.

Unfortunately the 2007 version of SPQuery doesn't have this property. Does this mean the query acts as though ViewFieldsOnly is set to true, or is it effectively false?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Regardless of the Fields listed in the ViewFields, SPQuery has always returned extra fields including ID, and a few other system related fields as well as auto-retrieving linked fields for computed columns etc. The ViewFieldsOnly allows you to really only return the exact fields specified. The downside is that the returned item may no longer be updateable without those key fields.

share|improve this answer

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.