Index Server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tim

    #1

    Index Server

    I'm trying to query the index server for document properties. The
    create view statement below is executed and later I call a function
    that fires the execution of the view which is shown below the view.
    I'm getting an error of "System.Data.Ol eDb.OleDbExcept ion: View
    '#WKCSEARCHVIEW ' has not been defined in catalog 'Web'.
    SQLSTATE=42S02" on the last line.

    Any help would be appreciated.

    -Tim


    //OleDbConnection
    OleDbConnection oConn = new OleDbConnection ("provider=msid xs; data
    source=Web");
    oConn.Open();

    OleDbCommand oCmd = new OleDbCommand(st rSetProperty, oConn);
    oCmd.ExecuteNon Query();
    //this does fire, I use the same connection for a few events

    strCreateView = "CREATE VIEW #WKCSearchView AS ";
    strCreateView += "SELECT FileIndex, DocTitle, vpath, filename, size,
    write, characterizatio n, rank ";

    strCreateView += "FROM SCOPE(' DEEP TRAVERSAL OF ( " + strScope + " )
    ')";

    oCmd.CommandTex t = strCreateView;
    oCmd.ExecuteNon Query();



    //set up the provider
    string strProvider = "PROVIDER=MSIDX S; DATA SOURCE=Web";

    //create the connection and open it
    OleDbConnection oConn = new OleDbConnection (strProvider);
    oConn.Open();

    OleDbDataAdapte r oCmd = new OleDbDataAdapte r(strSql, oConn);
    DataSet oDS = new DataSet();

    oCmd.Fill(oDS, "Results");
Working...