This project is read-only.

Boolean Type of Value uses Text instead of int.

Feb 2, 2011 at 7:30 PM

I am using the MOSS 2010 Client Object Model to run some CAML queries.

When I generate a query using CAML.NET for a boolean value containing a true, it generates the following:

<Eq><FieldRef Name='MyField' /><Value Type=\"Boolean\"></Value>True</Eq>

When I run this CAML query, it returns no hits.  However, if I use the following query:

<Eq><FieldRef Name='MyField' /><Value Type=\"Boolean\"></Value>1</Eq>

the query returns the expected values (where MyField == True.  It seems the client object model doesn't like a value of "True", but instead expects a "1".  Same holds true for false values.  If I want the query to return the expected results, I need to use a value of 0, not False.

Is there any way to get CAML.Net to use the values of zero and one for true/false instead of True and False?