locked
How to search case-insensivity string via SPQuery? RRS feed

  • Question

  • How to modify code
    SPQuery oQuery = new SPQuery();
    oQuery.Query = "<Where><Contains><FieldRef Name='Theme'/><Value Type='Text'>Help</Value></Contains></Where>";
    SPListItemCollection collListItems = oList.GetItems(oQuery);
    for search throw all variants of "Help" ("HELP", "help", "HeLp" etc)?
    Wednesday, May 20, 2009 12:58 PM

All replies

  • Did you test this?
    I thought SPQuery is case-insensitive, but I can't find it in the documentation and I haven't got the time to test it myself right now.
    Mirjam --http://www.sharepointblogs.com/mirjam
    Wednesday, May 20, 2009 1:24 PM
  • Caml queries are by default case-insensitive. I have no problem searching on different variations of a text value.
    http://www.certdev.com
    Wednesday, May 20, 2009 2:03 PM
  • Sorry for dummy question. I've got error from another code block

    Thursday, May 21, 2009 9:53 AM