Ask a Question related to ASP.NET General, Design and Development.
-
Don #1
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
-
#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... -
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"?>... -
#24256 [Fbk->NoF]: OCIFetch* returns truncated results
ID: 24256 Updated by: sniper@php.net Reported By: php at pgregg dot com -Status: Feedback +Status: ... -
#24256 [Opn->Fbk]: OCIFetch* returns truncated results
ID: 24256 Updated by: sniper@php.net Reported By: php at pgregg dot com -Status: Open +Status: ... -
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... -
tweekDev #2
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



Reply With Quote

