nerdexam
Microsoft

70-573 · Question #276

You need to create a Web Part that displays all of the content created by a specific user. You write the following code segment. (Line numbers are included for reference only.) 01 FullTextSqlQuery…

The correct answer is C. string strQuery = "SELECT Title,Author,Path. MNEMONIC RULE: "SQL to search for author" FullTextSqlQuery: Use this class to execute SQL syntax search queries. Windows SharePoint Services Search Query Object Model

Developing for Data Access

Question

You need to create a Web Part that displays all of the content created by a specific user. You write the following code segment. (Line numbers are included for reference only.) 01 FullTextSqlQuery qry = new FullTextSqlQuery(ServerContext.GetContext(SPContext. Current.Site)); 02 qry.ResultTypes = ResultType.RelevantResults; 03 04 qry.QueryText = strQuery; 05 ResultTableCollection results = qry.Execute(); Which code segment should you add at line 03?

Options

  • Astring strQuery = "author:" + searchAuthor;
  • Bstring strQuery = "docID:" + searchAuthor;
  • Cstring strQuery = "SELECT Title,Author,Path
  • Dstring strQuery = "SELECT Title,Creator,Path

How the community answered

(43 responses)
  • A
    2% (1)
  • B
    9% (4)
  • C
    84% (36)
  • D
    5% (2)

Explanation

MNEMONIC RULE: "SQL to search for author" FullTextSqlQuery: Use this class to execute SQL syntax search queries. Windows SharePoint Services Search Query Object Model

Topics

#FullTextSqlQuery#SQL search syntax#SharePoint search#search author

Community Discussion

No community discussion yet for this question.

Full 70-573 Practice