I'm running into an interesting problem when trying to query a Sharepoint list.
Here is the query so far:
camlQuery.ViewXml = new XElement("View",
new XElement("Query",
new XElement("Where",
new XElement("And",
new XElement("Geq",
new XElement("FieldRef", new XAttribute("Name", "Created_x0020_Date")),
new XElement("Value", new XAttribute("IncludeTimeValue", "TRUE"), new XAttribute("Type", "DateTime"), InStartDate.Get(context))),
new XElement("Leq",
new XElement("FieldRef", new XAttribute("Name", "Created_x0020_Date")),
new XElement("Value", new XAttribute("IncludeTimeValue", "TRUE"), new XAttribute("Type", "DateTime"), InEndDate.Get(context))))))).ToString();
The Created_x0020_Date column is just when the row was created.
What's interesting is that, no matter what I make the start and end dates, the query errors out with "The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator." The error seems to think that I'm returning more rows than the threshold is prepared to handle. But this error occurs even when my end date is before my start date, which should mean that it's impossible to find a date that matches the where clause.
Let me know if I can provide any more information.