S,
taking a look at your code I couldn't find any error.

Theres a tool called Sharepoint Manager 2010 that connect to your server and
allow you to see the caml from a view.

My point is, create a view in your list with that criteria (field Title =
"title") to see if it works. If it works fine, then you open your site with
that tool, walk to the list, open the view collection, choose your view and
take a look into the caml.

If your view does not work, then your criteria is really missing something
(and I don't know what could be) and that caml will never work, because it
was just proved that it is not an error in the caml.

You can answer me directly since this thread is not related to the group (I
guess).

Best regards,

On Thu, Nov 18, 2010 at 2:05 PM, S <[email protected]> wrote:

> Hello All - I know this is not the place for SharePoint questions. But
> I thought may be someone can direct me to the right resource where
> people may answer my question.
>
> I am writing a CAML query to retrieve data from SharePoint list and
> when I mention a criteria, it still returns the whole list instead of
> specific item. Is there something I am doing that may help me in
> getting the right resultset.
>
> eq:
>
> <Where>
>      <Eq>
>         <FieldRef Name="Title" />
>         <Value Type="Text">title</Value>
>      </Eq>
> </Where>
>
> Should return just record whose value matches title. Rather than that
> it returns everything. Then I have to convert it to string and match
> it using Equals to make it work. I dont like to loop through all the
> records to check if it is the right one. BTW I am writing a webpart
> using VS 2010 and SharePoint 2010.
>
> Thanks in advance.
>
> - S




-- 
Atenciosamente,
Paulo Roberto S. Pellucci

Reply via email to