views:

24

answers:

2

I have a list in sharepoint. I want to search across all the columns for a term. How would you co about doing this?

My idea was to get the SPFieldCollection, get all the fields and generate the CAML on the fly then query the list to get the items. Just wondering if there was a better way to do this as generating the CAML may prove to be difficult.

A: 

I'm accessing SP with webservices, not Object Model. Anyway, I would create the CAML dynamically. Generating the CAML will not be difficult, as you can always tryout your logic with

U2U CAML Query Builder http://www.u2u.net/res/Tools/CamlQueryBuilder.aspx

pfonseca
+2  A: 

Hi Linda

If you don't like the idea of building the CAML using string concatenation, then you could consider using CAML.Net

Per Jakobsen