sharepoint - CAML Query SPException -
i'm trying execute caml query, have spexception every time.
here query :
<where> <and> <eq> <fieldref name='user' /> <value type='computed'> " + foo + " </value> </eq> <and> <eq> <fieldref name='title' /> <value type='computed'> " + bar + " </value> </eq> <eq> <fieldref name='month' /> <value type='computed'> " + xyz + " </value> </eq> </and> </and> </where>
here use.
var query = new spquery { query = @"<where><and><eq><fieldref name='user' /><value type='computed'>" + foo + "</value></eq><and><eq><fieldref name='title' /><value type='computed'>" + bar + "</value></eq><eq><fieldref name='month' /><value type='computed'>" + xyz + "</value></eq></and></and></where>", viewattributes = "scope=\"recursiveall\"" }; result = listtoquery.getitems(query);
every properties of splistitemcollection result threw exception of type 'microsoft.sharepoint.spexception'
.
i checked columns internal names, seems alright. query i'm trying if(user == foo && title == bar && month == xyz)
. query parameters strings.
did miss in query ?
Comments
Post a Comment