ASP.Net with Indexing Services returns zero results

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default ASP.Net with Indexing Services returns zero results

    I am new to Indexing Services, have been researching the MS Site as well as
    web articles on DevHood, etc. I have set up a seperate catalog
    ("KnowledgeBase") on Win XP with a number of files. I am trying to use
    OLEDB through ADO to search results and serve them up onto an ASP.Net
    web page, yet I consistently get back 0 results.

    I have this working fine in a console application. I think my problem
    is I have to allow IIS access to my IS catalog, but I am not sure how.
    The MS articles in MSDN have not been of any assistance.


    Here is what I have tested:

    1. searching through management console works fine
    2. searching with a VB.Net console app works:

    Sub Main()


    Dim conn As OleDbConnection = New
    OleDbConnection("Provider=MSIDXS;Data Source=KnowledgeBase")

    Dim cmd As OleDbCommand = conn.CreateCommand()
    cmd.CommandText = "SELECT DocTitle FROM Scope()"
    Dim adapter As OleDbDataAdapter = New OleDbDataAdapter(cmd)

    Dim dt As DataTable = New DataTable("Results")
    Dim results As Integer = 0
    results = adapter.Fill(dt)

    Dim ds As DataSet = New DataSet("Search")
    ds.Tables.Add(dt)

    Console.WriteLine("Results = " + results.ToString)

    If (results > 0) Then

    Dim lRow As DataRow
    For Each lRow In ds.Tables("Results").Rows
    Console.WriteLine(lRow(0))
    Next

    End If

    Console.ReadLine()
    End Sub


    3. Search with an ASP.Net web page does not work (assume there is a
    search button, a datagrid for results, and a label to indicate result
    count)

    Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e
    As System.EventArgs) Handles btnSearch.Click

    Dim conn As OleDbConnection = New
    OleDbConnection("Provider=MSIDXS;Data Source=KnowledgeBase")

    Dim cmd As OleDbCommand = conn.CreateCommand()
    cmd.CommandText = "SELECT DocTitle FROM Scope()"
    Dim adapter As OleDbDataAdapter = New OleDbDataAdapter(cmd)

    Dim dt As DataTable = New DataTable("Results")
    Dim results As Integer = 0
    results = adapter.Fill(dt)

    Dim ds As DataSet = New DataSet("Search")
    ds.Tables.Add(dt)

    lblResultsCount.Text = results.ToString + " results."

    If (results > 0) Then

    DataGrid1.CurrentPageIndex = 0
    DataGrid1.DataSource = ds
    DataGrid1.DataBind()
    DataGrid1.Visible = True
    End If


    End Sub

    4. SYSTEM has r/w priviledges on my IS catalog and data directries.

    Thanks for any suggestions.

    Don

    P.S. Cross posted to the Index Server group.
    Don Guest

  2. Similar Questions and Discussions

    1. #39849 [NEW]: mysqli_stmt_num_rows returns 0 for queries with both 0 and 1 row results
      From: cody at codymays dot net Operating system: OSX 10.4.8 x86 PHP version: 5CVS-2006-12-16 (snap) PHP Bug Type: MySQLi...
    2. Web Services that returns XML - SAX Issue!
      From my CFMX7 application, I make a call to a Java Web service that returns me the following SOAP message: <?xml version="1.0" encoding="UTF-8"?>...
    3. #24256 [Fbk->NoF]: OCIFetch* returns truncated results
      ID: 24256 Updated by: sniper@php.net Reported By: php at pgregg dot com -Status: Feedback +Status: ...
    4. #24256 [Opn->Fbk]: OCIFetch* returns truncated results
      ID: 24256 Updated by: sniper@php.net Reported By: php at pgregg dot com -Status: Open +Status: ...
    5. asp search returns no results from access query
      access 2000 query: here's what i want to do. from an asp page, perform a search on a table in access. i have used sql code in the asp page...
  3. #2

    Default Re: ASP.Net with Indexing Services returns zero results

    Finnally found it. If you are letting the DataGrid automatically
    generate columns then it does not seem to do it right. As soon as I
    manualy defined bound columns in the grid the title for the documents
    that had it showed up. Try that, if you haven't already.



    [email]don@cameronsoftware.com[/email] (Don) wrote in message news:<11149158.0307010918.1b2bdce8@posting.google. com>...
    > I am new to Indexing Services, have been researching the MS Site as well as
    > web articles on DevHood, etc. I have set up a seperate catalog
    > ("KnowledgeBase") on Win XP with a number of files. I am trying to use
    > OLEDB through ADO to search results and serve them up onto an ASP.Net
    > web page, yet I consistently get back 0 results.
    >
    > I have this working fine in a console application. I think my problem
    > is I have to allow IIS access to my IS catalog, but I am not sure how.
    > The MS articles in MSDN have not been of any assistance.
    >
    >
    > Here is what I have tested:
    >
    > 1. searching through management console works fine
    > 2. searching with a VB.Net console app works:
    >
    > Sub Main()
    >
    >
    > Dim conn As OleDbConnection = New
    > OleDbConnection("Provider=MSIDXS;Data Source=KnowledgeBase")
    >
    > Dim cmd As OleDbCommand = conn.CreateCommand()
    > cmd.CommandText = "SELECT DocTitle FROM Scope()"
    > Dim adapter As OleDbDataAdapter = New OleDbDataAdapter(cmd)
    >
    > Dim dt As DataTable = New DataTable("Results")
    > Dim results As Integer = 0
    > results = adapter.Fill(dt)
    >
    > Dim ds As DataSet = New DataSet("Search")
    > ds.Tables.Add(dt)
    >
    > Console.WriteLine("Results = " + results.ToString)
    >
    > If (results > 0) Then
    >
    > Dim lRow As DataRow
    > For Each lRow In ds.Tables("Results").Rows
    > Console.WriteLine(lRow(0))
    > Next
    >
    > End If
    >
    > Console.ReadLine()
    > End Sub
    >
    >
    > 3. Search with an ASP.Net web page does not work (assume there is a
    > search button, a datagrid for results, and a label to indicate result
    > count)
    >
    > Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e
    > As System.EventArgs) Handles btnSearch.Click
    >
    > Dim conn As OleDbConnection = New
    > OleDbConnection("Provider=MSIDXS;Data Source=KnowledgeBase")
    >
    > Dim cmd As OleDbCommand = conn.CreateCommand()
    > cmd.CommandText = "SELECT DocTitle FROM Scope()"
    > Dim adapter As OleDbDataAdapter = New OleDbDataAdapter(cmd)
    >
    > Dim dt As DataTable = New DataTable("Results")
    > Dim results As Integer = 0
    > results = adapter.Fill(dt)
    >
    > Dim ds As DataSet = New DataSet("Search")
    > ds.Tables.Add(dt)
    >
    > lblResultsCount.Text = results.ToString + " results."
    >
    > If (results > 0) Then
    >
    > DataGrid1.CurrentPageIndex = 0
    > DataGrid1.DataSource = ds
    > DataGrid1.DataBind()
    > DataGrid1.Visible = True
    > End If
    >
    >
    > End Sub
    >
    > 4. SYSTEM has r/w priviledges on my IS catalog and data directries.
    >
    > Thanks for any suggestions.
    >
    > Don
    >
    > P.S. Cross posted to the Index Server group.
    tweekDev Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139