Microsoft Exam Questions

Which code segment should you use?

You are creating a web service that uses Search Service in SharePoint 2007. The service uses the key word query object. The web service must return results only for the author named John Smith. You need to construct a query for the key word query object.

Which code segment should you use?

A.
strQuery = author:””John Smith””:

B.
strQuery=”siteAuthor:””John Smith”””:

C.
strQuery=”select `John Smith’ from Scope() where Constraints(`author’)”;

D.
strQuery=”select author from Scope() where Contains(`John Smith’)”;