I am trying to take a DataTable containing ID and other columns which are not hidden.
I am doing this for a generic list which contains any number/type of columns. so I don't know the field names which are in the list.
This is the code I am trying to do..
SPWeb myWeb = SPContext.Current.Web;
SPList myList = myWeb.Lists[ListName];
if (myList != null)
{
SPQuery query = new SPQuery();
query.Query = "<Where><Or><Eq><FieldRef Name='Hidden' /><Value Type='Bool'>FALSE</Value></Eq><Eq><FieldRef Name='Title' /><Value Type='Text'>ID</Value></Eq><Or></Where>";
DataTable dtListSource = myList.GetItems(query).GetDataTable();
I am getting this error now..
One or more field types are not installed properly. Go to the list settings page to delete these fields.
I am working on SharePoint 2007(WSS3) with .NET Framework 2.0, so Linq does not seems available.
Can you tell me what I was doing wrong here? I'm pretty new to SharePoint and I hope I could caml query to SPListItem's properties like this..