Have I written the below CAML query correctly? Am I missing anything? I am encountering an error on below line of code.
SPQuery spQuery = new SPQuery();
spQuery.Query = "<Where><And><Eq><FieldRef Name='Flag'/><Value Type='Text'>" + "1" + "</Value></Eq>" + "<Eq><FieldRef Name='Connection Type'/><Value Type='Text'>" + "Active Directory" + "</Value></Eq></And></Where>";
The error reads...
One or more field types are not installed properly. Go to the list settings page to delete these fields
"
connection type
. Sometimes space between column names occurs this type of issues. Also check their column types.