I have a web part I have developed in Visual Studio. It just goes out to a document library and gets all the items:
SPListItemCollection collListItems = oDocumentLibrary.GetItems();
This works fine. But whenever I try to include a query:
SPQuery qry = new SPQuery();
qry.ViewFields = "<FieldRef Name=\"Name\"/><FieldRef Name=\"Modified\"/><FieldRef Name=\"Url\"/>";
qry.ViewFieldsOnly = true; // Fetch only the data that we need.
qry.ViewAttributes = "Scope=\"Recursive\"";
SPListItemCollection collListItems = oDocumentLibrary.GetItems(qry);
and try to add the web part to a page I get the following error on the page:
Failed to render "Wiki Content" column because of an error in the "multiple lines of text" field type control. Value does not fall within the expected range