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
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)- A2% (1)
- B9% (4)
- C84% (36)
- D5% (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
Community Discussion
No community discussion yet for this question.