How to extract data from SQL Server with the Index Server Search Result?

Discussion in 'ASP .Net' started by savvy, Jan 14, 2006.

  1. savvy

    savvy Guest

    I am developing a Recruitment Agency Website
    I am using MS SQL Server in which I have a table called CV_Details
    which stores all the details of different Job Seekers. I have stored
    all the Word and PDF docs of the Job seekers in a 'mycatalog' using
    Index Server and stored the path in the CV_Details table along with
    rest of the cv details. Basically I want to download the cv's which i
    get after making a search in the doc's. I am able to get the filename,
    Path, Filesize by using Index Server Query.
    Is it anyway possible to extract all the CV Details data by matching
    the path.
    I want the cv details from the SQL Server of all the Related Paths at
    the same time not one at a time. Is it possible.
    I tried alot but i'm going nowhere. I'm giving my code below. Can
    anyone help me please.
    Thank you very much in Advance

    string strCatalog = "TestCatalog", strsearchstrings="";
    string strQuery="";
    strsearchstrings = txtsearch.Text;

    strQuery = "Select Filename,PATH from Scope() where
    FREETEXT('" +strsearchstrings+ "')";
    // TextBox1.Text is the word that you type in the text box
    to query by using Indexing Service.
    string connstring = "Provider=MSIDXS.1;Integrated Security
    ..='';Data Source="+strCatalog;

    System.Data.OleDb.OleDbConnection conn = new
    System.Data.OleDb.OleDbConnection(connstring);
    conn.Open();


    System.Data.OleDb.OleDbCommand objcmd = new
    System.Data.OleDb.OleDbCommand(strQuery, conn);
    System.Data.OleDb.OleDbDataReader objRdr;

    objRdr = objcmd.ExecuteReader();
    DataGrid1.DataSource=objRdr;
    DataGrid1.DataBind();
    objRdr.Close();
    conn.Close();
     
    savvy, Jan 14, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harry Zoroc
    Replies:
    1
    Views:
    980
    Gregory Vaughan
    Jul 12, 2004
  2. Alan
    Replies:
    6
    Views:
    167
    Manohar Kamath [MVP]
    Sep 11, 2003
  3. sujeet kumar
    Replies:
    3
    Views:
    335
    Eric Hodel
    Jun 12, 2005
  4. Michael Tan
    Replies:
    32
    Views:
    1,054
    Ara.T.Howard
    Jul 21, 2005
  5. Tomasz Chmielewski

    sorting index-15, index-9, index-110 "the human way"?

    Tomasz Chmielewski, Mar 4, 2008, in forum: Perl Misc
    Replies:
    4
    Views:
    337
    Tomasz Chmielewski
    Mar 4, 2008
Loading...

Share This Page