Trying to load a list from library containing two files. The following code when tested in CamlBuilder it is returning single row according to the filename selected. But in the program it is returning the whole library regardless of the filename queried
private Microsoft.SharePoint.Client.List list;
CamlQuery q = new CamlQuery();
q.ViewXml = @"<Query>
<Where>
<Eq>
<FieldRef Name='FileLeafRef' />
<Value Type='File'>"+ fileName + @"</Value>
</Eq>
</Where>
</Query>";
var items = list.GetItems(q);
cc.Load(items);
//cc is the client context
cc.ExecuteQuery();
var item = items[0];
cc.ExecuteQuery();
var fileRef = item["FileRef"].ToString();
...
Please Help.. Thanks.