using System.IO;
Directory.GetFiles()

解决方案 »

  1.   

    其实我是要问使用微软的index server进行检索!asp中用Set objQuery = Server.CreateObject("ixsso.Query")建立对象检索,不知道asp.net怎样建立该对象啊?
      

  2.   

    你可以用oledb来连接index server 
    string constr="PROVIDER=MSIDXS;DATA SOURCE=KB";
    OleDbConnection con=new OleDbConnection(constr);
    try
    {
    OleDbCommand cmd=new OleDbCommand();
    cmd.Connection=con;
    cmd.CommandText="SELECT  Rank, DocAuthor, DocAppName, DocTitle, FileName, Create, Access, Characterization, VPath from FROM SCOPE('\"/\"')";
    con.Open();
    OleDbDataReader reader=cmd.ExecuteReader();
    reader.Close();
    }
    catch(Exception E)
    {
    Response.Write(E.Message);
    }
    finally
    {
    con.Close();
    }
      

  3.   

    不过那个SQL好像有错。:)我不知道为什么。:(书上好像就是这么写的。