I am trying to check if a filename exists in the 'Name' column of Shared Docs Library. I think only CAML could help here. So I made this query
"<Where><Eq><FieldRef Name='Name' /><Value Type='Text'>" + docname + "</Value></Eq></Where>" But I get this error One or more field types are not installed properly. Go to the list settings page to delete these fields.
string docname = "Disabled Service"; StringBuilder sb = new StringBuilder(); sb.Append("<Where><Eq><FieldRef Name='Name' /><Value Type='Text'>"+docname+"</Value></Eq></Where>"); SPQuery spq = new SPQuery(); spq.Query = sb.ToString(); spq.RowLimit = 1; SPList list = web.Lists["Shared Documents"]; DataTable dt = list.GetItems(spq).GetDataTable(); Kindly help..