473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ASP.Net with Indexing Services returns zero results

Don
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.
Nov 17 '05 #1
1 3519
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.

do*@cameronsoftware.com (Don) wrote in message news:<11**************************@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.

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: lkrubner | last post by:
www.php.net says: >>>>>>>>>>>> Only for SELECT,SHOW,EXPLAIN or DESCRIBE statements mysql_query() returns a resource identifier or FALSE if the query was not executed correctly. For other type of...
2
by: Michael Hatmaker | last post by:
I have begun experimenting with web services, and I created some simple web services in C# and was able to install them with IIS and create an equally simple C# client to consume them. My next...
15
by: Jay | last post by:
Hello all. I've recently transferred our web sites from a Windows2000 server to a Windows2003 server. The transfer went almost flawless until I noticed that our search function isn't working...
2
by: HumanJHawkins | last post by:
Hi, I am using data from multiple databases and/or queries. It would greatly simplify and speed things up if I could use CONTAINS in processing the results. However, "CONTAINS" requires the data...
2
by: Brent | last post by:
Hi, I have indexing servicing working fine on my test server for a search engine in C# ASP.NET, but when I tried to make one on our live server, its not working correctly. The index only returns...
108
by: Bryan Olson | last post by:
The Python slice type has one method 'indices', and reportedly: This method takes a single integer argument /length/ and computes information about the extended slice that the slice object would...
10
by: Lyle Fairfield | last post by:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaac11/html/acfctNZ_HV05186465.asp "If the value of the variant argument is Null, the Nz function returns the number zero or a...
0
by: Chung Leong | last post by:
Here's a short tutorial on how to the OLE-DB extension to access Windows Indexing Service. Impress your office-mates with a powerful full-text search feature on your intranet. It's easier than you...
8
by: ash | last post by:
i'm using the indexing service and CreateRecordSet("nonsequential") in asp.......and i cant retrieve the record although the keywords is matched. Does anybody know how to solve it? thx
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.