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

searching index server with c#

P: n/a
I found some code on how to run a search against index server, but it
isn't working. I'm getting an exception saying...

System.Data.OleDb.OleDbException: Column 'AGENCYID' has not been
defined. SQLSTATE=42S22

Here's my code.

System.Data.OleDb.OleDbConnection odbSearch = new
System.Data.OleDb.OleDbCommand cmdSearch = new
odbSearch.ConnectionString = "Provider=\"MSIDXS\";Data

cmdSearch.Connection = odbSearch;
cmdSearch.CommandText = "Select AgencyId from scope() where
@Site=230 order by rank desc";

OleDbDataReader rd = cmdSearch.ExecuteReader();
catch (Exception exc)
odbSearch.Close(); odbSearch.Dispose(); odbSearch = null;

Since AgencyId is not in the text part of the htm but in the meta
portion, I'm not sure if I have the query correct. But, in relation to
the error, I've used the IXSSO.Query object in VB6 and had to define
columns. It appears that's the problem here, but I'm not sure how to
define columns in this case. Can anyone shed some light on this?

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

This discussion thread is closed

Replies have been disabled for this discussion.