By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,333 Members | 1,391 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,333 IT Pros & Developers. It's quick & easy.

Problem with Indexing Service while searching for c#

P: n/a
I am using Windows Xp, ASP.net 1.2 and Indexing Service to search the
contents of resume files.

While search if C# is entered the results are shown but when i try to
use c# it is showing error.

Can anyone help me whether Indexing Service is case sensitve. only when
i include # this problem is arising.

The following is the query i am generating

strQuery = "Select DocTitle,Filename,Size,PATH,URL from Scope() where
Contains ('" + TextBox1.Text + "')";
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.OleDbDataAdapter cmd = new
System.Data.OleDb.OleDbDataAdapter(strQuery, conn);

System.Data.DataSet testDataSet = new System.Data.DataSet();

try
{
cmd.Fill(testDataSet, "SearchResults");
DataView index = new DataView(testDataSet.Tables[0]);

int rcount = index.Count;
if (rcount == 0)
{
Response.Write("No Results");
}
else
{

GridView1.DataSource = index;
GridView1.DataBind();
}

}
catch (Exception ex)
{
Response.Write(ex.Message);
}

thanks

Apr 3 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.