Access Index server

J

Jesper Stocholm

Hi all,

I am trying to access our index server via ASP.Net, but it keeps
throwing exceptions when I do my search. I have tried with OleDB and
ADO, but they both throw exceptions.

Can you help me figure out, what I am doing wrong?

ADO.Net:

System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection();
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand();
conn.ConnectionString = "Provider=MSIDX";
cmd.Connection = conn;

cmd.CommandText = "SELECT * FROM ...";
conn.Open();
System.Data.SqlClient.SqlDataReader rdrSearch = cmd.ExecuteReader();

Exception:

Keyword not supported: 'provider'.


OleDB:

System.Data.OleDb.OleDbConnection odbSearch = new System.Data.OleDb.OleDbConnection();
System.Data.OleDb.OleDbCommand cmdSearch = new System.Data.OleDb.OleDbCommand();
odbSearch.ConnectionString = "Provider=\"MSIDXS\";Data Source=\"[Web]\";";
cmdSearch.Connection = odbSearch;
cmdSearch.CommandText = "SELECT * FROM ..."
odbSearch.Open();
System.Data.OleDb.OleDbDataReader rdrSearch = cmdSearch.ExecuteReader();

Exception:
IErrorInfo.GetDescription failed with REGDB_E_CLASSNOTREG

What am I missing here?

Thanks,

:eek:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top