title: Sharepoint Object Model vs WebServices
body: <p>I had created a xml query that I was sending to my sharepoint search service which was returning some results.  I then pulled the SQL query text out of it and started using it with the object model and now it's not working.  Does it look like I am doing something wrong based on the code below?</p>
  
  <p>Query XML (returns results):</p>
  
  <pre><code>&lt;QueryPacket xmlns="urn:Microsoft.Search.Query" Revision="1000"&gt;
                                      &lt;Query domain="QDomain"&gt;
                                       &lt;SupportedFormats&gt;&lt;Format&gt;urn:Microsoft.Search.Response.Document.Document&lt;/Format&gt;&lt;/SupportedFormats&gt;
                                       &lt;Context&gt;
                                         &lt;QueryText language="en-US" type="MSSQLFT"&gt;&lt;![CDATA[ SELECT Title, Rank, owsPublished1,owsSocialx0020Networkx0020Update, Description, Write, Path FROM scope()   ORDER BY "Rank" DESC ]]&gt;&lt;/QueryText&gt;
                                       &lt;/Context&gt;
                                       &lt;Range&gt;&lt;StartAt&gt;1&lt;/StartAt&gt;&lt;Count&gt;20&lt;/Count&gt;&lt;/Range&gt;
                                       &lt;EnableStemming&gt;false&lt;/EnableStemming&gt;
                                       &lt;TrimDuplicates&gt;true&lt;/TrimDuplicates&gt;
                                       &lt;IgnoreAllNoiseQuery&gt;true&lt;/IgnoreAllNoiseQuery&gt;
                                       &lt;ImplicitAndBehavior&gt;true&lt;/ImplicitAndBehavior&gt;        &lt;IncludeRelevanceResults&gt;true&lt;/IncludeRelevanceResults&gt;                               &lt;IncludeSpecialTermResults&gt;true&lt;/IncludeSpecialTermResults&gt;                        
  &lt;IncludeHighConfidenceResults&gt;true&lt;/IncludeHighConfidenceResults&gt;
                                      &lt;/Query&gt;&lt;/QueryPacket&gt;
  </code></pre>
  
  <p>Object model code (doesn't):</p>
  
  <pre><code>        SPSite site = new SPSite("http://sp-dev/");
          ServerContext sc = ServerContext.GetContext(site);
          FullTextSqlQuery ftq = new FullTextSqlQuery(sc);
          string querySQL = @"SELECT Title, Rank, owsPublished1,owsSocialx0020Networkx0020Update, Description, Write, Path FROM scope()   ORDER BY ""Rank"" DESC ";
  
          ftq.QueryText = querySQL;;
          ResultTableCollection results = ftq.Execute();
  </code></pre>