Querying a remote Indexing Service database
I'm trying to search the Indexing Service of a remote Windows 2003 server from ASP.NET. There's sample code for this on the MS site, but only for local searches. Here's what I've got so far; the remote server in this example is called "indexserver", isn't on a domain, and has a index called "system":
OleDbConnection conn = new OleDbConnection();
conn.ConnectionString = "Provider=开发者_Python百科MSIDXS;User ID=administrator;Password=Password";
OleDbCommand cmd = conn.CreateCommand();
cmd.CommandText= "SELECT * FROM indexserver.system..FILEINFO";
conn.Open();
cmd.ExecuteReader();
Running this gives me the error "Multiple-step OLE DB operation generated errors. Check the OLE DB status if available. No work was done".
Does anyone know how to get this working? All I need to do is query the Index for a filename and get the path of that file back.
Never mind, I discovered that Windows Indexing Service is somewhat depreciated,and Windows Search seems to be the way to go...
精彩评论