SELECT TOP 25 System.Search.QueryFocusedSummary From SystemIndex where <br /> CONTAINS('microsoft') ORDER BY System.ItemDate DESC
using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Data.OleDb; using System.IO; using System.Security.Permissions; using System.Text; using Microsoft.Search.Interop; namespace QueryFocusedSummaryTest { class Program [Stathread] static void Main(string[] args) { string sqlQuery = "select top 25 System.Search.QueryFocusedSummary from SystemIndex where contains('microsoft') order by System.ItemDate DESC"; CSearchManager manager = new CSearchManager(); ISearchCtalogManager catalogMaager = manager.GetCatalog("SystemIndex"); ISearchQueryHelper queryHelper = catalogManager.GetQueryHelper(); using (System.Data.OleDb.OleDbConnection conn = new OleDbConnection(queryHelper.ConnectionString)) { conn.Open(); using (OleDbCommand command = new OleDbCommand(sqlQuery, conn)) { OleDbDataAdapter ds = new OleDbDataAdapter(command); DataSet ds = new DataSet(); ds.Fill(ds); command.ExecuteNonQuery(); //By now it has thrown the exception } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)